Merge branch 'ardalis/basket-add' into master

This commit is contained in:
Steve Smith
2017-07-27 11:39:42 -04:00
committed by GitHub
13 changed files with 179 additions and 49 deletions

View File

@@ -15,6 +15,7 @@ using ApplicationCore.Interfaces;
using Infrastructure.FileSystem;
using Infrastructure.Logging;
using Microsoft.AspNetCore.Identity;
using Web.Services;
namespace Microsoft.eShopWeb
{
@@ -67,10 +68,19 @@ namespace Microsoft.eShopWeb
services.AddMemoryCache();
services.AddScoped<ICatalogService, CachedCatalogService>();
services.AddScoped<IBasketService, BasketService>();
services.AddScoped<CatalogService>();
services.Configure<CatalogSettings>(Configuration);
services.AddSingleton<IImageService, LocalFileImageService>();
services.AddScoped(typeof(IAppLogger<>), typeof(LoggerAdapter<>));
// Add memory cache services
services.AddMemoryCache();
// Add session related services.
services.AddSession();
services.AddMvc();
_services = services;
@@ -111,6 +121,8 @@ namespace Microsoft.eShopWeb
app.UseExceptionHandler("/Catalog/Error");
}
app.UseSession();
app.UseStaticFiles();
app.UseIdentity();