コード例 #1
0
        public async Task OnGetAsync(Guid cipaId, string codigo, string nome)
        {
            CipaId = cipaId;

            EstabelecimentosGetAllResult = await estabelecimentosClient.GetAllAsync(new EstabelecimentosGetAll()
            {
                Codigo = codigo,
                Nome   = nome
            });
        }
コード例 #2
0
        public async Task <IActionResult> OnPostEstabelecimentosPartialAsync()
        {
            var estabelecimentosGetAllResult = await estabelecimentosClient.GetAllAsync(EstabelecimentosGetAll);

            return(new PartialViewResult()
            {
                ViewName = "_EstabelecimentosPartial",
                ViewData = new ViewDataDictionary <EstabelecimentosGetAllResult>(ViewData, estabelecimentosGetAllResult)
            });

            //construção abaixo não funciona, simplesmente não consegue interpretar o tipo da variável 'estabelecimentosGetAllResult' e fica considerando que o Model da Partial é 'IndexModel'.
            //return Partial("_EstabelecimentosPartial", estabelecimentosGetAllResult);
        }