Class CreateUserCommandHandler
- Namespace
- KadicAuth.Application.Users.Commands
- Assembly
- KadicAuth.Application.dll
public sealed class CreateUserCommandHandler : IRequestHandler<CreateUserCommand, Result<Guid>>
- Inheritance
-
objectCreateUserCommandHandler
- Implements
Constructors
CreateUserCommandHandler(IUserRepository, ITenantBranchRepository, IRoleRepository, IPasswordHasher, IAuthUnitOfWork, ICurrentUser, IPlatformAdminService, ITenantIdContext, IStringLocalizer<AuthMessages>)
public CreateUserCommandHandler(IUserRepository userRepository, ITenantBranchRepository tenantBranchRepository, IRoleRepository roleRepository, IPasswordHasher passwordHasher, IAuthUnitOfWork unitOfWork, ICurrentUser currentUser, IPlatformAdminService platformAdminService, ITenantIdContext tenantIdContext, IStringLocalizer<AuthMessages> localizer)
Parameters
userRepositoryIUserRepositorytenantBranchRepositoryITenantBranchRepositoryroleRepositoryIRoleRepositorypasswordHasherIPasswordHasherunitOfWorkIAuthUnitOfWorkcurrentUserICurrentUserplatformAdminServiceIPlatformAdminServicetenantIdContextITenantIdContextlocalizerIStringLocalizer<AuthMessages>
Methods
Handle(CreateUserCommand, CancellationToken)
Handles a request
public Task<Result<Guid>> Handle(CreateUserCommand request, CancellationToken cancellationToken)
Parameters
requestCreateUserCommandThe request
cancellationTokenCancellationTokenCancellation token
Returns
- Task<Result<Guid>>
Response from the request