更新工程:Boostrap.Client工程消除编译错误
This commit is contained in:
parent
1eeeac388d
commit
384be45a5b
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.2.0" />
|
<PackageReference Include="Bootstrap.Security.DataAccess" Version="1.3.0" />
|
||||||
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
<PackageReference Include="Longbow.Cache" Version="2.2.3" />
|
||||||
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
<PackageReference Include="Longbow.Web" Version="2.2.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Longbow.Data;
|
using Longbow.Data;
|
||||||
|
using PetaPoco;
|
||||||
|
|
||||||
namespace Bootstrap.Client.DataAccess
|
namespace Bootstrap.Client.DataAccess
|
||||||
{
|
{
|
||||||
|
@ -10,6 +11,6 @@ namespace Bootstrap.Client.DataAccess
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static IDbAccess DbAccess { get { return DbAdapterManager.CreateDB(); } }
|
public static IDatabase DbAccess { get { return DbManager.Create(); } }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,9 @@ namespace Bootstrap.Client.DataAccess
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IEnumerable<BootstrapMenu> RetrieveAppMenus(string userName, string activeUrl)
|
public static IEnumerable<BootstrapMenu> RetrieveAppMenus(string userName, string activeUrl)
|
||||||
{
|
{
|
||||||
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0 && m.ApplicationCode == ConfigurationManager.AppSettings["AppId"]);
|
var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0 && m.Application == ConfigurationManager.AppSettings["AppId"]).Where(m => m.ParentId == "0").OrderBy(m => m.Application).ThenBy(m => m.Order);
|
||||||
var root = menus.Where(m => m.ParentId == "0").OrderBy(m => m.ApplicationCode).ThenBy(m => m.Order);
|
var root = DbHelper.CascadeMenus(menus);
|
||||||
DbHelper.CascadeMenus(menus, root);
|
DbHelper.ActiveMenu(root, activeUrl);
|
||||||
DbHelper.ActiveMenu(null, menus, activeUrl);
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Bootstrap.Client
|
||||||
services.AddLogging(builder => builder.AddFileLogger());
|
services.AddLogging(builder => builder.AddFileLogger());
|
||||||
services.AddConfigurationManager(Configuration);
|
services.AddConfigurationManager(Configuration);
|
||||||
services.AddCacheManager(Configuration);
|
services.AddCacheManager(Configuration);
|
||||||
services.AddDbAdapter(Configuration);
|
services.AddDbAdapter();
|
||||||
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
|
||||||
.SetApplicationName(Configuration["ApplicationName"])
|
.SetApplicationName(Configuration["ApplicationName"])
|
||||||
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
|
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
|
||||||
|
@ -60,7 +60,7 @@ namespace Bootstrap.Client
|
||||||
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
|
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
|
||||||
{
|
{
|
||||||
options.Cookie.Path = "/";
|
options.Cookie.Path = "/";
|
||||||
options.RebuildRedirectUri(ConfigurationManager.AppSettings["AuthHost"]);
|
options.RebuildRedirectUri();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue