Пример #1
0
        public UserDTO AddUser(NewUserDTO newUserDTO)
        {
            var user = DtoFactory.NewUserDtoToUserModel(newUserDTO);

            db.Users.AddEntity(user);
            db.Save();
            var id           = user.Id;
            var newUserModel = db.Users.GetUserById(id);

            return(DtoFactory.UserModelToUserDTO(newUserModel));
        }