public async Task <IActionResult> Index() { return(View(await _generoService.ObterTodos())); }
public IQueryable <Genero> ObterTodos() { return(_generoService.ObterTodos()); }
private async Task PopularSelectList(MusicaViewModel musicaViewModel) { musicaViewModel.Albuns = (await _albumService.ObterTodos()).Select(p => new SelectListItem(p.Nome, p.Id.ToString())); musicaViewModel.Generos = (await _generoService.ObterTodos()).Select(p => new SelectListItem(p.Nome, p.Id.ToString())); }
public async Task <IEnumerable <GeneroViewModel> > ObterTodos() { var generos = await _generoService.ObterTodos(); return(_generoServiceMapper.MapToListaGeneroViewModel(generos)); }