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); }
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)); }
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); }
public IActionResult GetInventoryItems() { var inventoryItems = _services.GetInventoryItems(); return(inventoryItems.Count > 0 ? Json(new { inventoryItems }) : Json("Not Data Found")); }
public IEnumerable <InventoryItem> GetInventoryItems() { var inventoryItems = _services.GetInventoryItems(); return(inventoryItems); }