public HttpResponseMessage Post(Bin value) { this.UnitOfWork.Bins.Add(value); this.UnitOfWork.Commit(); var response = Request.CreateResponse(HttpStatusCode.Created, value); response.Headers.Location = new Uri(Url.Link(WebApiConfig.ControllerAndId, new { id = value.Id })); return response; }
public HttpResponseMessage Put(Bin value) { this.UnitOfWork.Bins.Update(value); this.UnitOfWork.Commit(); return new HttpResponseMessage(HttpStatusCode.NoContent); }