public async Task <Guid> CreateUser(CreateUserRequest request) { request.EnsureNotNull(nameof(request)); var user = new User { Id = Guid.NewGuid(), Username = request.Username, PasswordHash = GetPasswordHash(request.Password), Role = request.Role }; await _userRepo.CreateUser(user); return(user.Id); }