private async void CarregarListadeTesteDePessoas() { var n = new Name("Carlos", "Anderson"); var p = new Person(n); var e = new Address("rua das pedras"); var c = new Contact(EContactType.EMAIL, "*****@*****.**"); var cc = new Contact(EContactType.EMAIL, "*****@*****.**"); p.Add(e); p.Add(c); p.Add(cc); var n1 = new Name("Carlos2", "Anderson2"); var p1 = new Person(n); var e1 = new Address("rua das pedras2"); var c1 = new Contact(EContactType.EMAIL, "*****@*****.**"); var cc1 = new Contact(EContactType.EMAIL, "*****@*****.**"); p1.Add(e); p1.Add(c1); p1.Add(cc1); try { await _repository.Add(p); await _repository.Add(p1); } catch (Exception er) { var ee = er; } }
public Response <bool> lfInsert(tb_persona persona) { Response <bool> response = new Response <bool>(); try { response.ReturnValue = DomainPersona.Add(persona); } catch (Exception ex) { response.blnTransactionIndicator = false; response.ReturnValue = false; response.strOrigin = ex.ToString(); } return(response); }