// GET: Inventory/Details/5
        public IActionResult Details(int?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }

            var inventory = _repo.GetOne(id);

            if (inventory == null)
            {
                return(NotFound());
            }
            return(View(inventory));
        }
        // GET: Inventory/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var inventory = _context.GetOne(id);

            if (inventory == null)
            {
                return(NotFound());
            }

            return(View(inventory));
        }
        public async Task <IActionResult> GetInventory([FromRoute] int id)
        {
            Inventory inventory = _repo.GetOne(id);

            if (inventory == null)
            {
                return(NotFound());
            }
            return(Ok(Mapper.Map <Inventory, Inventory>(inventory)));
        }
        public async Task <ActionResult <Inventory> > GetInventory(int id)
        {
            var inventory = _repo.GetOne(id);

            if (inventory == null)
            {
                return(NotFound());
            }

            return(Ok(Mapper.Map <Inventory, Inventory>(inventory)));
        }
        public async Task <ActionResult> GetInventory([FromRoute] int id)
        {
            var inventory = await Task.Run(() => _repo.GetOne(id));

            if (inventory == null)
            {
                return(NotFound());
            }

            return(Ok(mapper.Map <Inventory, Inventory>(inventory)));
        }