public ActionResult UpdateUserService(int userId, UpdateUserServiceRequest updateUserServiceRequest) { if (updateUserServiceRequest == null) { return(BadRequest(new { error = "We Need More Info About Your Service" })); } var updatedUser = _userServiceRepository.UpdateUserService( userId, updateUserServiceRequest.UserId, updateUserServiceRequest.ServiceId); return(Ok()); }
public ActionResult UpdateUserService(int userServiceId, int serviceId) { var listOfUserServices = _userServiceRepository.UpdateUserService(); var userServiceToUpdate = (from userService in listOfUserServices where (userService.Id == userServiceId) select userService).SingleOrDefault(); userServiceToUpdate.ServiceId = serviceId; return(Accepted(userServiceToUpdate)); }