// Create public HttpResponseMessage Post(Classroom room) { Uow.Rooms.Add(room); Uow.Commit(); var response = Request.CreateResponse(HttpStatusCode.Created, room); response.Headers.Location = new Uri(Url.Link(WebApiConfig.ControllerAndId, new { id = room.Id })); return response; }
// Update public HttpResponseMessage Put(Classroom room) { Uow.Rooms.Update(room); Uow.Commit(); return new HttpResponseMessage(HttpStatusCode.NoContent); }