示例#1
0
        public async Task <HttpResponseMessage> Delete(string id)
        {
            IItemHistory history = await _itemHistoryBusinessLogic.Get(ObjectId.Parse(id));

            _itemHistoryBusinessLogic.Delete(history);
            return(CreateResponse(HttpStatusCode.NoContent));
        }
示例#2
0
        public async Task <HttpResponseMessage> Post(ItemHistory history)
        {
            IItemHistory createdHistory = await _itemHistoryBusinessLogic.Save(history);

            createdHistory = await _itemHistoryBusinessLogic.Get(createdHistory._id);

            return(CreateResponse(HttpStatusCode.Created, history));
        }
示例#3
0
        public async Task <HttpResponseMessage> Put(ItemHistory history)
        {
            IItemHistory updatedHistory = await _itemHistoryBusinessLogic.Update(history);

            return(CreateResponse(HttpStatusCode.OK, updatedHistory));
        }
示例#4
0
        public async Task <HttpResponseMessage> Get(string id)
        {
            IItemHistory history = await _itemHistoryBusinessLogic.Get(ObjectId.Parse(id));

            return(CreateResponse(HttpStatusCode.OK, history));
        }