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);
        }
Esempio n. 2
0
        /// <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;
     }
 }
Esempio n. 4
0
        /// <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();
        }
Esempio n. 5
0
 public bool Insert(UserDetails userdetails)
 {
     _repository.Create(userdetails);
     return(_repository.SaveChanges());
 }