public async Task <UserDto> Register(UserDto user) { var response = await _userRepository.Create(_mapper.Map <UserDetails>(user)) .ContinueWith(x => _mapper.Map <UserDto>(x.Result)); return(response); }
/// <summary> /// Saves user details provided while signup /// </summary> public void SaveUserDetails(AspNetUser addedUser, RegisterViewModel model) { UserDetail user = userDetailsRepository.Create(); user.UserId = addedUser.Id; userDetailsRepository.Add(user); userDetailsRepository.SaveChanges(); }
public async Task Process(UserDetails userDetails) { try { await _repository.Create(userDetails); } catch (Exception ex) { throw ex; } }
/// <summary> /// Saves user details provided while signup /// </summary> public void SaveUserDetails(AspNetUser addedUser, RegisterViewModel model) { UserDetail user = userDetailsRepository.Create(); user.AccountType = model.AccountType; user.Address = model.CompanyAddress; user.CompanyName = model.CompanyName; user.CountryName = model.CountryName; user.CompanyShortUrl = model.ShortUrl; user.UserId = addedUser.Id; userDetailsRepository.Add(user); userDetailsRepository.SaveChanges(); }
public bool Insert(UserDetails userdetails) { _repository.Create(userdetails); return(_repository.SaveChanges()); }