Пример #1
0
        public InventoryItemDetail GetInventoryItemDetails(Guid id)
        {
            var detailsDto = _readmodel.GetInventoryItemDetails(id);

            if (detailsDto == null)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }
            else
            {
                return(new InventoryItemDetail(detailsDto.Id, detailsDto.Name,
                                               detailsDto.CurrentCount, detailsDto.Version));
            }
        }
Пример #2
0
 public ActionResult Details(Guid id)
 {
     ViewData.Model = _readmodel.GetInventoryItemDetails(id);
     return(View());
 }
Пример #3
0
        public IActionResult Details(Guid id)
        {
            var model = _readmodel.GetInventoryItemDetails(id);

            return(View(model));
        }