replace counter by specific query to avoid load each items in memory (#611)
* replace counter by specific query to avoid load each items in memory * Create IBasketQueryService
This commit is contained in:
@@ -13,13 +13,12 @@ namespace Microsoft.eShopWeb.Web.Configuration
|
||||
public static IServiceCollection AddCoreServices(this IServiceCollection services,
|
||||
IConfiguration configuration)
|
||||
{
|
||||
//services.AddScoped(typeof(IAsyncRepository<>), typeof(EfRepository<>));
|
||||
services.AddScoped(typeof(IReadRepository<>), typeof(EfRepository<>));
|
||||
services.AddScoped(typeof(IRepository<>), typeof(EfRepository<>));
|
||||
|
||||
services.AddScoped<IBasketService, BasketService>();
|
||||
services.AddScoped<IOrderService, OrderService>();
|
||||
//services.AddScoped<IOrderRepository, OrderRepository>();
|
||||
services.AddScoped<IBasketQueryService, BasketQueryService>();
|
||||
services.AddSingleton<IUriComposer>(new UriComposer(configuration.Get<CatalogSettings>()));
|
||||
services.AddScoped(typeof(IAppLogger<>), typeof(LoggerAdapter<>));
|
||||
services.AddTransient<IEmailSender, EmailSender>();
|
||||
|
||||
Reference in New Issue
Block a user