public User EditUser(User model, int userId) { var editUser = _unitOfWork.UserRepository.GetById(userId); model = this._userManagementServices.EditService.Edit(model, editUser); _unitOfWork.SaveChanges(); return model; }
public User AddUser(User model) { var users = _unitOfWork.UserRepository.GetAll(); model = this._userManagementServices.AddService.Add(model, users); _unitOfWork.UserRepository.Add(model); _unitOfWork.SaveChanges(); return model; }