style: rename classes

This commit is contained in:
Polianin Nikita 2024-01-21 22:31:10 +03:00
parent 67e9b89379
commit 9aa74218aa
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
namespace Mirea.Api.DataAccess.Application.Cqrs.TypeOfOccupation.Commands.CreateTypeOfOccupation;
public class TypeOfOccupationCommand : IRequest<int>
public class CreateTypeOfOccupationCommand : IRequest<int>
{
public required string ShortName { get; set; }
public string? FullName { get; set; }

View File

@ -7,9 +7,9 @@ using System.Threading.Tasks;
namespace Mirea.Api.DataAccess.Application.Cqrs.TypeOfOccupation.Commands.CreateTypeOfOccupation;
public class TypeOfOccupationCommandHandler(ITypeOfOccupationDbContext dbContext) : IRequestHandler<TypeOfOccupationCommand, int>
public class CreateTypeOfOccupationCommandHandler(ITypeOfOccupationDbContext dbContext) : IRequestHandler<CreateTypeOfOccupationCommand, int>
{
public async Task<int> Handle(TypeOfOccupationCommand request, CancellationToken cancellationToken)
public async Task<int> Handle(CreateTypeOfOccupationCommand request, CancellationToken cancellationToken)
{
var entity = await dbContext.TypeOfOccupations.FirstOrDefaultAsync(t => t.ShortName == request.ShortName, cancellationToken: cancellationToken);