public async Task <List <ClienteViewModel> > GetClientes() { ClienteAplication clienteAplication = new ClienteAplication(); var clienteViewModel = await clienteAplication.ObterTodos(); return(clienteViewModel); }
private async Task MostrarTudoGrid() { try { ClienteAplication clienteAplication = new ClienteAplication(); var listaCliente = await clienteAplication.ObterTodos(); dataGridView.DataSource = null; dataGridView.DataSource = listaCliente; dataGridView.Refresh(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.Message); } }
public async Task <ActionResult> Index() { var clientesViewModel = await clienteAplication.ObterTodos(); return(View(clientesViewModel)); }