public void Add(string nome, string cpf) { Cliente c = new Cliente(); c.Nome = nome; c.Cpf = cpf; ClienteDAO dao = new ClienteDAO(); dao.Add(c); }
public bool Add(string nome, string cpf) { Cliente c = new Cliente(); c.Nome = nome; c.CPF = cpf; ClienteDAO dao = new ClienteDAO(); dao.Add(c); return(true); }
public bool Add(string nome, string cpf) { var result = false; try { var dao = new ClienteDAO(); var cliente = new Cliente(); cliente.CPF = cpf; cliente.Nome = nome; dao.Add(cliente); result = true; } catch { } return result; }