public async Task <IActionResult> Index() { IdentityUser user = await _userManager.GetUserAsync(HttpContext.User); IEnumerable <GrupoIndexDTO> grupoIndexDTOs = await _grupoService.GetAllAsync(user.Id); return(View(grupoIndexDTOs)); }
public async Task <ActionResult <IList <Grupo> > > GetAsync() { try { var grupos = await _service.GetAllAsync(); return(new OkObjectResult(grupos)); } catch (Exception ex) { return(new BadRequestObjectResult(ex)); } }