public ActionResult Index()
        {
            var Items = ItemService.GetItem().Select(x => new ItemModel
            {
                ID          = x.ID,
                Name        = x.Name,
                Description = x.Description,
            }).ToList();

            return(View(Items));
        }
Esempio n. 2
0
 public async Task <IActionResult> Get(int id)
 {
     return(Ok(await _itemsService.GetItem(id)));
 }