public IActionResult UpdateRequest(int Id, Request request) { var updateRequestFromRepo = _repository.GetRequestById(Id); if (updateRequestFromRepo == null) { return(NotFound()); } _repository.UpdateRequest(updateRequestFromRepo); _repository.SaveChanges(); return(NoContent()); }