public void Add(AppUser appUser)
 {
     if (appUser == null)
     {
         throw new System.NotImplementedException();
     }
     _appUserDal.Add(appUser);
 }
Beispiel #2
0
        public async Task <IDataResult <AppUserOutput> > Add(AppUserRegisterInput registerInput)
        {
            var control = await BusinessRules.RunAsync(CheckUserEmail(registerInput.Email));

            if (!control.Success)
            {
                return(new ErrorDataResult <AppUserOutput>(control.Message));
            }

            var user = MapsterTool.Map <AppUserRegisterInput, AppUser>(registerInput);

            CreatePasswordHash(user, registerInput.Password);
            await _appUserDal.Add(user);

            var userOutput = MapsterTool.Map <AppUser, AppUserOutput>(user);

            return(new SuccessDataResult <AppUserOutput>(userOutput, Messages.Successfully));
        }
Beispiel #3
0
 public AppUser Add(AppUser entity)
 {
     return(_appUserDal.Add(entity));
 }
 public void Add(AppUser appUser)
 {
     _appUserDal.Add(appUser);
 }