public ActionResult update(int id, DateTime date, string title, string contents, double rating, int productID, int orderProductDetailID, string img) { try { Responses responses = _responsesService.Get(_ => _.Id == id); if (responses == null) { throw new Exception(); } responses.Date = date; responses.Title = title; responses.Contents = contents; responses.Rating = rating; responses.ProductId = productID; responses.OrderProductDetailId = orderProductDetailID; _responsesService.Update(responses); _responsesService.SaveChanges(); return(StatusCode(204)); } catch (Exception e) { return(BadRequest(e.Message)); } }