21 lines
787 B
C#
21 lines
787 B
C#
using MediatR;
|
|
using Microsoft.eShopWeb.Web.Interfaces;
|
|
using Microsoft.eShopWeb.Web.Services;
|
|
|
|
namespace Microsoft.eShopWeb.Web.Configuration;
|
|
|
|
public static class ConfigureWebServices
|
|
{
|
|
public static IServiceCollection AddWebServices(this IServiceCollection services, IConfiguration configuration)
|
|
{
|
|
services.AddMediatR(typeof(BasketViewModelService).Assembly);
|
|
services.AddScoped<IBasketViewModelService, BasketViewModelService>();
|
|
services.AddScoped<CatalogViewModelService>();
|
|
services.AddScoped<ICatalogItemViewModelService, CatalogItemViewModelService>();
|
|
services.Configure<CatalogSettings>(configuration);
|
|
services.AddScoped<ICatalogViewModelService, CachedCatalogViewModelService>();
|
|
|
|
return services;
|
|
}
|
|
}
|