Updating Blazor Admin (#442)

* Updating Blazor services

* Adding Settings and Refactoring Services

* WIP - Fighting with DI

* Configuring dependencies in both Web Startup and BlazorAdmin Program.cs has them working again.

* Everything works; need to optimize calls to ListBrands

* LocalStorageBrandService decorator working

* Added cache duration of 1 minute

* Refactoring to reduce token storage
Fixed issue with dropdowns binding to int

* Remove token stuff from login; moved to CustomAuthStateProvider

* Migrated CatalogTypes to separate service
Implemented cache decorator

* Ardalis/blazor refactor (#440)

* 1. Migrate CatalogItemServices -> CatalogItemService.
3. Add caching to CatalogItemService.

* change to $"Loading {key} from local storage" ?

* docker settings added. (#441)

* docker settings added.

* InDocker Removed

* InDocker removed from web startup.

* removed unused using

* no reload list if close without save

* startup patch for localhost

* file name fixed

* removed docker from launchSettings.

* Configure logging via appsettings

Co-authored-by: Shady Nagy <info@shadynagy.com>
This commit is contained in:
Steve Smith
2020-07-30 23:50:51 -04:00
committed by GitHub
parent 98fb0ee8ce
commit e9a9dc06d7
77 changed files with 865 additions and 533 deletions

View File

@@ -1,22 +1,21 @@
using BlazorAdmin.Services.CatalogItemServices;
using BlazorAdmin.Services;
using BlazorShared.Interfaces;
using Microsoft.Extensions.DependencyInjection;
namespace BlazorAdmin
{
public static class ServicesConfiguration
{
public static IServiceCollection AddBlazorServices(this IServiceCollection service)
public static IServiceCollection AddBlazorServices(this IServiceCollection services)
{
service.AddScoped<Create>();
service.AddScoped<ListPaged>();
service.AddScoped<Delete>();
service.AddScoped<Edit>();
service.AddScoped<GetById>();
services.AddScoped<ICatalogBrandService, CachedCatalogBrandServiceDecorator>();
services.AddScoped<CatalogBrandService>();
services.AddScoped<ICatalogTypeService, CachedCatalogTypeServiceDecorator>();
services.AddScoped<CatalogTypeService>();
services.AddScoped<ICatalogItemService, CachedCatalogItemServiceDecorator>();
services.AddScoped<CatalogItemService>();
service.AddScoped<BlazorAdmin.Services.CatalogBrandServices.List>();
service.AddScoped<BlazorAdmin.Services.CatalogTypeServices.List>();
return service;
return services;
}
}
}