예제 #1
0
 public async Task <IActionResult> Index()
 {
     return(View(await _generoService.ObterTodos()));
 }
 public IQueryable <Genero> ObterTodos()
 {
     return(_generoService.ObterTodos());
 }
예제 #3
0
 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()));
 }
예제 #4
0
        public async Task <IEnumerable <GeneroViewModel> > ObterTodos()
        {
            var generos = await _generoService.ObterTodos();

            return(_generoServiceMapper.MapToListaGeneroViewModel(generos));
        }