From 9aa74218aa026cccf9fe1c4d4e0cea6ebee11e0e Mon Sep 17 00:00:00 2001 From: Polianin Nikita Date: Sun, 21 Jan 2024 22:31:10 +0300 Subject: [PATCH] style: rename classes --- ...fOccupationCommand.cs => CreateTypeOfOccupationCommand.cs} | 2 +- ...mandHandler.cs => CreateTypeOfOccupationCommandHandler.cs} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/{TypeOfOccupationCommand.cs => CreateTypeOfOccupationCommand.cs} (78%) rename Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/{TypeOfOccupationCommandHandler.cs => CreateTypeOfOccupationCommandHandler.cs} (80%) diff --git a/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommand.cs b/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommand.cs similarity index 78% rename from Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommand.cs rename to Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommand.cs index 7aacbe9..0fa5547 100644 --- a/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommand.cs +++ b/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommand.cs @@ -2,7 +2,7 @@ namespace Mirea.Api.DataAccess.Application.Cqrs.TypeOfOccupation.Commands.CreateTypeOfOccupation; -public class TypeOfOccupationCommand : IRequest +public class CreateTypeOfOccupationCommand : IRequest { public required string ShortName { get; set; } public string? FullName { get; set; } diff --git a/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommandHandler.cs b/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommandHandler.cs similarity index 80% rename from Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommandHandler.cs rename to Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommandHandler.cs index b51507b..d677fb6 100644 --- a/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/TypeOfOccupationCommandHandler.cs +++ b/Application/Cqrs/TypeOfOccupation/Commands/CreateTypeOfOccupation/CreateTypeOfOccupationCommandHandler.cs @@ -7,9 +7,9 @@ using System.Threading.Tasks; namespace Mirea.Api.DataAccess.Application.Cqrs.TypeOfOccupation.Commands.CreateTypeOfOccupation; -public class TypeOfOccupationCommandHandler(ITypeOfOccupationDbContext dbContext) : IRequestHandler +public class CreateTypeOfOccupationCommandHandler(ITypeOfOccupationDbContext dbContext) : IRequestHandler { - public async Task Handle(TypeOfOccupationCommand request, CancellationToken cancellationToken) + public async Task Handle(CreateTypeOfOccupationCommand request, CancellationToken cancellationToken) { var entity = await dbContext.TypeOfOccupations.FirstOrDefaultAsync(t => t.ShortName == request.ShortName, cancellationToken: cancellationToken);