Update music store to handle the new changes in aspnet/WebFx#257 and aspnet/WebFx#259
This commit is contained in:
parent
aa7fe89c81
commit
c06aa04654
|
|
@ -28,18 +28,21 @@ public class Startup
|
||||||
public static InMemoryUserStore<ApplicationUser> UserStore = new InMemoryUserStore<ApplicationUser>();
|
public static InMemoryUserStore<ApplicationUser> UserStore = new InMemoryUserStore<ApplicationUser>();
|
||||||
public static InMemoryRoleStore<IdentityRole> RoleStore = new InMemoryRoleStore<IdentityRole>();
|
public static InMemoryRoleStore<IdentityRole> RoleStore = new InMemoryRoleStore<IdentityRole>();
|
||||||
|
|
||||||
|
private static void ConfigureServices(ServiceCollection services)
|
||||||
|
{
|
||||||
|
services.AddInstance<ILoggerFactory>(new NullLoggerFactory());
|
||||||
|
services.AddMvc();
|
||||||
|
}
|
||||||
|
|
||||||
public void Configuration(IBuilder app)
|
public void Configuration(IBuilder app)
|
||||||
{
|
{
|
||||||
CreateAdminUser(app.ServiceProvider);
|
CreateAdminUser(app.ServiceProvider);
|
||||||
|
|
||||||
|
app.UseContainer(ConfigureServices);
|
||||||
|
|
||||||
//ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production.
|
//ErrorPageOptions.ShowAll to be used only at development time. Not recommended for production.
|
||||||
app.UseErrorPage(ErrorPageOptions.ShowAll);
|
app.UseErrorPage(ErrorPageOptions.ShowAll);
|
||||||
|
|
||||||
var serviceCollection = new ServiceCollection();
|
|
||||||
serviceCollection.AddInstance<ILoggerFactory>(new NullLoggerFactory());
|
|
||||||
serviceCollection.Add(MvcServices.GetDefaultServices());
|
|
||||||
app.UseContainer(serviceCollection.BuildServiceProvider(app.ServiceProvider));
|
|
||||||
|
|
||||||
app.UseFileServer();
|
app.UseFileServer();
|
||||||
|
|
||||||
app.UseCookieAuthentication(new CookieAuthenticationOptions()
|
app.UseCookieAuthentication(new CookieAuthenticationOptions()
|
||||||
|
|
@ -50,7 +53,7 @@ public class Startup
|
||||||
|
|
||||||
var routes = new RouteCollection()
|
var routes = new RouteCollection()
|
||||||
{
|
{
|
||||||
DefaultHandler = new MvcApplication(app.ServiceProvider),
|
DefaultHandler = new MvcRouteHandler(),
|
||||||
};
|
};
|
||||||
|
|
||||||
routes.MapRoute(
|
routes.MapRoute(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue