コード例 #1
0
 public async Task CheckingEmailExists(string email, UserRegisterModelOut response)
 {
     if (await _repos.Users.CheckingEmailExists(email))
     {
         response.AddError(CustomErrorEnum.UsedEmail);
     }
 }
コード例 #2
0
        public async Task Register(UserModel userModel, UserRegisterModelOut response)
        {
            User user = _mapper.Map <User>(userModel);

            await _repos.Users.Create(user);

            if (await _repos.SaveAsync() == 0)
            {
                response.AddError(CustomErrorEnum.UnsuccessfulRegister);
            }
        }