Ejemplo n.º 1
0
        private async Task <SelectList> GetEstabelecimentosListAsync()
        {
            var estabelecimentos = await _estabelecimentoService.GetEstabelecimentoAsync();

            estabelecimentos.Insert(0, new EstabelecimentoModel {
                Estabelecimento_Id = -1, Estabelecimento_Nome = "Selecione um Estebelecimento..."
            });

            return(new SelectList(estabelecimentos, "Estabelecimento_Id", "Estabelecimento_Nome"));
        }
        public async Task <IActionResult> Index()
        {
            var estabelecimentos = await _estabelecimentoService.GetEstabelecimentoAsync();

            return(View(estabelecimentos));
        }