fix: 修复 Client 工程编译错误
This commit is contained in:
parent
b32e28ca2c
commit
d381ef1e51
|
@ -117,10 +117,11 @@ namespace BootstrapClient.Web.Shared.Shared
|
|||
if (!string.IsNullOrEmpty(userName))
|
||||
{
|
||||
UserName = userName;
|
||||
DisplayName = UsersService.GetDisplayName(userName);
|
||||
var user = UsersService.GetUserByUserName(userName);
|
||||
|
||||
MenuItems = NavigationsService.GetAllMenus(userName).ToClientMenus();
|
||||
|
||||
DisplayName = user?.DisplayName ?? "未注册账户";
|
||||
Title = DictsService.GetWebTitle();
|
||||
Footer = DictsService.GetWebFooter();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
using BootstrapAdmin.Web.Core;
|
||||
using PetaPoco.Providers;
|
||||
using PetaPoco;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection
|
||||
|
@ -24,7 +26,13 @@ namespace Microsoft.Extensions.DependencyInjection
|
|||
services.AddBootstrapAdminSecurity<AdminService>();
|
||||
|
||||
// 增加 PetaPoco 数据服务
|
||||
services.AddPetaPocoDataAccessServices();
|
||||
services.AddPetaPocoDataAccessServices((provider, builder) =>
|
||||
{
|
||||
var configuration = provider.GetRequiredService<IConfiguration>();
|
||||
var connString = configuration.GetConnectionString("bb");
|
||||
builder.UsingProvider<SQLiteDatabaseProvider>()
|
||||
.UsingConnectionString(connString);
|
||||
});
|
||||
|
||||
return services;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue