Exemplo n.º 1
0
        //public IViewComponentResult Invoke()
        public async Task <IViewComponentResult> InvokeAsync()
        {
            var makes = await _serviceWrapper.GetAllAsync <Make>();

            if (makes == null)
            {
                return(new ContentViewComponentResult("Unable to get the makes"));
            }

            return(View("MenuView", makes));
        }
 public async Task <IActionResult> Index()
 {
     return(View(await _serviceWrapper.GetAllAsync <Make>()));
 }
Exemplo n.º 3
0
 public async Task <IActionResult> Index() => View(await _serviceWrapper.GetAllAsync <Car>());