更新工程:Boostrap.Client工程消除编译错误

This commit is contained in:
Argo-Surface 2019-01-20 17:10:09 +08:00
parent 1eeeac388d
commit 384be45a5b
4 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@
</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.Web" Version="2.2.2" />
</ItemGroup>

View File

@ -1,4 +1,5 @@
using Longbow.Data;
using PetaPoco;
namespace Bootstrap.Client.DataAccess
{
@ -10,6 +11,6 @@ namespace Bootstrap.Client.DataAccess
/// <summary>
///
/// </summary>
public static IDbAccess DbAccess { get { return DbAdapterManager.CreateDB(); } }
public static IDatabase DbAccess { get { return DbManager.Create(); } }
}
}

View File

@ -22,10 +22,9 @@ namespace Bootstrap.Client.DataAccess
/// <returns></returns>
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 root = menus.Where(m => m.ParentId == "0").OrderBy(m => m.ApplicationCode).ThenBy(m => m.Order);
DbHelper.CascadeMenus(menus, root);
DbHelper.ActiveMenu(null, menus, activeUrl);
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 = DbHelper.CascadeMenus(menus);
DbHelper.ActiveMenu(root, activeUrl);
return root;
}

View File

@ -40,7 +40,7 @@ namespace Bootstrap.Client
services.AddLogging(builder => builder.AddFileLogger());
services.AddConfigurationManager(Configuration);
services.AddCacheManager(Configuration);
services.AddDbAdapter(Configuration);
services.AddDbAdapter();
var dataProtectionBuilder = services.AddDataProtection(op => op.ApplicationDiscriminator = Configuration["ApplicationDiscriminator"])
.SetApplicationName(Configuration["ApplicationName"])
.PersistKeysToFileSystem(new DirectoryInfo(Configuration["KeyPath"]));
@ -60,7 +60,7 @@ namespace Bootstrap.Client
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
{
options.Cookie.Path = "/";
options.RebuildRedirectUri(ConfigurationManager.AppSettings["AuthHost"]);
options.RebuildRedirectUri();
});
}