Example #1
0
        private async Task <User> GetUser(UserDraft userDraft)
        {
            var existingUser = await _userDataService.FirstOrDefault(u => u.Email == userDraft.Email);

            if (!(existingUser is null))
            {
                return(existingUser);
            }

            var user = new User
            {
                FirstName = userDraft.FirstName,
                LastName  = userDraft.LastName,
                Email     = userDraft.Email,
            };

            return(await _userDataService.Create(user));
        }
Example #2
0
 /*
  * Please view method description in UserBusinessInterface
  */
 public User CreateUser(User user)
 {
     return(service.Create(user));
 }