public IActionResult GetAll() { try { return(Ok(produtoApplicationService.GetAll())); } catch (Exception e) { return(StatusCode(500, e.Message)); } }
public virtual async Task <ActionResult> Index() { List <Produto> produtos = await _appSvc.GetAll().ToListAsync <Produto>(); return(View(produtos)); }