update mediatR

This commit is contained in:
Steve Smith
2023-02-28 15:15:46 -05:00
parent 74e067a734
commit 0542c52d79
3 changed files with 3 additions and 4 deletions

View File

@@ -15,8 +15,7 @@
<PackageVersion Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageVersion Include="BuildBundlerMinifier" Version="3.2.449" PrivateAssets="All" />
<PackageVersion Include="FluentValidation" Version="11.5.1" />
<PackageVersion Include="MediatR" Version="11.1.0" />
<PackageVersion Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageVersion Include="MediatR" Version="12.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.3" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.3" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="7.0.3" />

View File

@@ -8,7 +8,8 @@ public static class ConfigureWebServices
{
public static IServiceCollection AddWebServices(this IServiceCollection services, IConfiguration configuration)
{
services.AddMediatR(typeof(BasketViewModelService).Assembly);
services.AddMediatR(cfg =>
cfg.RegisterServicesFromAssembly(typeof(BasketViewModelService).Assembly));
services.AddScoped<IBasketViewModelService, BasketViewModelService>();
services.AddScoped<CatalogViewModelService>();
services.AddScoped<ICatalogItemViewModelService, CatalogItemViewModelService>();

View File

@@ -17,7 +17,6 @@
<PackageReference Include="Ardalis.Specification" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="MediatR" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" />
<PackageReference Include="BuildBundlerMinifier" Condition="'$(Configuration)'=='Release'" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" />