public async Task <HttpResponseMessage> Delete(string id) { IItemHistory history = await _itemHistoryBusinessLogic.Get(ObjectId.Parse(id)); _itemHistoryBusinessLogic.Delete(history); return(CreateResponse(HttpStatusCode.NoContent)); }
public async Task <HttpResponseMessage> Post(ItemHistory history) { IItemHistory createdHistory = await _itemHistoryBusinessLogic.Save(history); createdHistory = await _itemHistoryBusinessLogic.Get(createdHistory._id); return(CreateResponse(HttpStatusCode.Created, history)); }
public async Task <HttpResponseMessage> Put(ItemHistory history) { IItemHistory updatedHistory = await _itemHistoryBusinessLogic.Update(history); return(CreateResponse(HttpStatusCode.OK, updatedHistory)); }
public async Task <HttpResponseMessage> Get(string id) { IItemHistory history = await _itemHistoryBusinessLogic.Get(ObjectId.Parse(id)); return(CreateResponse(HttpStatusCode.OK, history)); }