Commit c4245ed6 authored by Almouhannad's avatar Almouhannad

(B) Fix Create employee folder

parent 73165d66
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Employees\Commands\AttachFamilyMemberToEmployee\" />
<Folder Include="Employees\Queries\" /> <Folder Include="Employees\Queries\" />
</ItemGroup> </ItemGroup>
</Project> </Project>
using Application.Abstractions.CQRS.Commands; using Application.Abstractions.CQRS.Commands;
namespace Application.Employees.Commands.Create; namespace Application.Employees.Commands.CreateEmployee;
public class CreateEmployeeCommand : ICommand public class CreateEmployeeCommand : ICommand
{ {
......
...@@ -5,7 +5,7 @@ using Domain.Repositories; ...@@ -5,7 +5,7 @@ using Domain.Repositories;
using Domain.Shared; using Domain.Shared;
using Domain.UnitOfWork; using Domain.UnitOfWork;
namespace Application.Employees.Commands.Create; namespace Application.Employees.Commands.CreateEmployee;
public class CreateEmployeeCommandHandler : ICommandHandler<CreateEmployeeCommand> public class CreateEmployeeCommandHandler : ICommandHandler<CreateEmployeeCommand>
{ {
...@@ -53,7 +53,7 @@ public class CreateEmployeeCommandHandler : ICommandHandler<CreateEmployeeComman ...@@ -53,7 +53,7 @@ public class CreateEmployeeCommandHandler : ICommandHandler<CreateEmployeeComman
//return Result.Failure(new Error("Persistence.UnableToSaveTransaction", exp.Message)); //return Result.Failure(new Error("Persistence.UnableToSaveTransaction", exp.Message));
// For deployment // For deployment
return Result.Failure(Domain.Errors.PersistenceErrors.UnableToCompleteTransaction); return Result.Failure(PersistenceErrors.UnableToCompleteTransaction);
} }
return Result.Success(); return Result.Success();
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
using Domain.ValidationConstants.RegularExpressions; using Domain.ValidationConstants.RegularExpressions;
using FluentValidation; using FluentValidation;
namespace Application.Employees.Commands.Create; namespace Application.Employees.Commands.CreateEmployee;
public class CreateEmployeeCommandValidator : AbstractValidator<CreateEmployeeCommand> public class CreateEmployeeCommandValidator : AbstractValidator<CreateEmployeeCommand>
{ {
......
using Application.Employees.Commands.Create; using Application.Employees.Commands.CreateEmployee;
using MediatR; using MediatR;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Presentation.Controllers.Base; using Presentation.Controllers.Base;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment