public bool CreateUser(UserDto userDto) { userRepository.Create(userDto.ConvertToUser()); return(userRepository.Context.Commit()); return(Context.Commit()); }
public void CreateUser(UserDto UserDto) { var User = UserDto.ConvertToUser(); _unitOfWork.Users.Add(User); _unitOfWork.Complete(); }
//dang ky public void dangky(CustomerDto customer, UserDto user) { var customers = customer.ConvertToCustomer(); var users = user.ConvertToUser(); _unitOfWork.Customers.Add(customers); _unitOfWork.Complete(); users.UserCustomerId = customers.CustomerId; users.UserPermissionId = 1; _unitOfWork.Users.Add(users); _unitOfWork.Complete(); }
public bool UpdateUser(UserDto userDto) { userRepository.Update(userDto.ConvertToUser()); return(base.Context.Commit()); }