// POST api/food public HttpResponseMessage Post([FromBody] Food food) { if (food == null) { return(Request.CreateResponse(HttpStatusCode.NoContent)); } classManager.AddToDB(food); HttpResponseMessage msg = Request.CreateResponse(HttpStatusCode.Created); return(msg); }