public HttpResponseMessage Put(Product product) { Uow.Products.Update(product); Uow.Commit(); return new HttpResponseMessage(HttpStatusCode.NoContent); }
public HttpResponseMessage Post(Product product) { Uow.Products.Add(product); Uow.Commit(); var response = Request.CreateResponse(HttpStatusCode.Created, product); response.Headers.Location = new Uri(Url.Link("DefaultApi", product.Id)); return response; }