refactor: add .editorconfig and refactor code

This commit is contained in:
2024-12-25 05:43:30 +03:00
parent 2a33ecbf07
commit 408a95e4b3
45 changed files with 371 additions and 75 deletions

View File

@ -1,4 +1,4 @@
using FluentValidation;
using FluentValidation;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Mirea.Api.DataAccess.Application.Common.Behaviors;
@ -11,7 +11,7 @@ public static class DependencyInjection
public static IServiceCollection AddApplication(this IServiceCollection services)
{
services.AddMediatR(cfg => cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()));
services.AddValidatorsFromAssemblies(new[] { Assembly.GetExecutingAssembly() });
services.AddValidatorsFromAssemblies([Assembly.GetExecutingAssembly()]);
services.AddTransient(typeof(IPipelineBehavior<,>),
typeof(ValidationBehavior<,>));
return services;