make : // TODO: Make a generic service for any LookupData type (#594)

* make :  // TODO: Make a generic service for any LookupData type => CatalogLookupDataService

* Update src/BlazorAdmin/Services/CachedCatalogTypeServiceDecorator.cs

Co-authored-by: Steve Smith <steve@kentsmiths.com>
This commit is contained in:
Cédric Michel
2021-10-26 16:59:50 +02:00
committed by GitHub
parent 8f55b1b56a
commit f6a975acbe
18 changed files with 122 additions and 140 deletions

View File

@@ -1,5 +1,6 @@
using BlazorAdmin.Services;
using BlazorShared.Interfaces;
using BlazorShared.Models;
using Microsoft.Extensions.DependencyInjection;
namespace BlazorAdmin
@@ -8,10 +9,10 @@ namespace BlazorAdmin
{
public static IServiceCollection AddBlazorServices(this IServiceCollection services)
{
services.AddScoped<ICatalogBrandService, CachedCatalogBrandServiceDecorator>();
services.AddScoped<CatalogBrandService>();
services.AddScoped<ICatalogTypeService, CachedCatalogTypeServiceDecorator>();
services.AddScoped<CatalogTypeService>();
services.AddScoped<ICatalogLookupDataService<CatalogBrand>, CachedCatalogBrandServiceDecorator>();
services.AddScoped<CatalogLookupDataService<CatalogBrand, CatalogBrandResponse>>();
services.AddScoped<ICatalogLookupDataService<CatalogType>, CachedCatalogTypeServiceDecorator>();
services.AddScoped<CatalogLookupDataService<CatalogType, CatalogTypeResponse>>();
services.AddScoped<ICatalogItemService, CachedCatalogItemServiceDecorator>();
services.AddScoped<CatalogItemService>();