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

            return(View(produtos));
        }