Пример #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));
        }