public ActionResult <Dictionary <string, InventoryItems> > GetInventoryItems()
        {
            var inventoryItems = _services.GetInventoryItems();

            if (inventoryItems.Count == 0)
            {
                return(NotFound());
            }
            return(inventoryItems);
        }
        public ActionResult <Dictionary <string, InventoryItems> > GetInventoryItems()
        {
            var items = _service.GetInventoryItems();

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

            return(items);
        }
Ejemplo n.º 3
0
        public ActionResult <Dictionary <string, InventoryItem> > GetInventoryItems()
        {
            Dictionary <string, InventoryItem> inventoryItems = _services.GetInventoryItems();

            if (inventoryItems.Count() == 0)
            {
                NotFound();
            }

            return(inventoryItems);
        }
        public ActionResult <List <InventoryItems> > GetInventoryItems()
        {
            var inventoryItems = _services.GetInventoryItems();

            if (inventoryItems.Count == 0)
            {
                return(NotFound());
            }

            return(inventoryItems.Values.ToList());
        }
        public ActionResult <Dictionary <string, InventoryItems> > GetInventoryItems()
        {
            var inventoryItems = _services.GetInventoryItems();

            if (inventoryItems == null)
            {
                logger.Info("No access!");
                return(NotFound());
            }
            logger.Info("items retrieved successfully");
            return(Ok(inventoryItems));
        }
Ejemplo n.º 6
0
        public ActionResult <Dictionary <string, InventoryItems> > GetInventoryItems()
        {
            var inventoryItems = _services?.GetInventoryItems();

            if (inventoryItems?.Count == 0)
            {
                return(new Dictionary <string, InventoryItems>
                {
                    { "Nothing Added", new InventoryItems {
                          Id = 0, ItemName = "NONE", Price = 0
                      } }
                });
            }

            return(inventoryItems);
        }
Ejemplo n.º 7
0
        public IActionResult GetInventoryItems()
        {
            var inventoryItems = _services.GetInventoryItems();

            return(inventoryItems.Count > 0 ? Json(new { inventoryItems }) : Json("Not Data Found"));
        }
Ejemplo n.º 8
0
        public IEnumerable <InventoryItem> GetInventoryItems()
        {
            var inventoryItems = _services.GetInventoryItems();

            return(inventoryItems);
        }