Exemple #1
0
 /// <summary>
 /// 添加一个用户
 /// </summary>
 /// <param name="user"></param>
 /// <returns></returns>
 public int AddUser(SystemUser user)
 {
     if (user != null)
     {
         sus.Add(user);
         int result = sus.SaveChanges();
         return(result);
     }
     else
     {
         return(0);
     }
 }
 public async Task Create(UserCreateModel model)
 {
     var systemUser = _userMapper.Map(model, SystemUserService.CalculatePasswordHash);
     await _systemUserService.Add(systemUser);
 }