Exemplo n.º 1
0
        public async Task <ActionResult <UserDTO> > Post(UserDTO user)
        {
            var storedUser = await _userRepositary.Create(_mapper.Map <User>(user));

            await _householdRepositary.Create(storedUser, new Household { Name = "Default" });

            return(Created($"/users/{user.Email}", _mapper.Map <UserDTO>(storedUser)));
        }