예제 #1
0
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var cars = _repo.GetAll(x => x.Make, true);

            if (cars != null)
            {
                return(View("InventoryPartialView", cars));
            }
            return(new ContentViewComponentResult("Unable to locate records."));
        }
        public async Task <ActionResult <IEnumerable <Inventory> > > GetCars()
        {
            var inventories = _repo.GetAll();

            return(Mapper.Map <List <Inventory>, List <Inventory> >(inventories));
        }
        public IEnumerable <Inventory> GetCars()
        {
            var inventories = _repo.GetAll();

            return(Mapper.Map <List <Inventory>, List <Inventory> >(inventories));
        }
        public IEnumerable <Inventory> GetCars()
        {
            List <Inventory> inventory = _repo.GetAll();

            return(_mapper.Map <List <Inventory>, List <Inventory> >(inventory));
        }