private async void abb_salvar_Click(object sender, RoutedEventArgs e) { if (!Edit) { if (contatos.Any()) { clienteViewModel.Cliente.Contatos = (from contato in contatos.ToList() select contato.ContaContato).ToList(); } if (enderecos.Any()) { clienteViewModel.Cliente.Enderecos = (from endereco in enderecos.ToList() select endereco.ContaEndereco).ToList(); } } WSService ws = new WSService(); var result = await ws.Post(Constantes.SERVER_CLIENTES, clienteViewModel.Cliente); }
public async Task <bool> Cria(T entity) { var result = await wsService.Post(_uriPadrao, entity); return(ValidaResponse(result)); }