Пример #1
0
 public static bool RemoverPF(PessoaFisica pf)
 {
     try
     {
         mdl.pessoaFisicas.Remove(pf);
         mdl.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #2
0
 public static bool AlterarPF(PessoaFisica pf)
 {
     try
     {
         mdl.Entry(pf).State = System.Data.Entity.EntityState.Modified;
         mdl.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #3
0
 public static bool AdicionarPF(PessoaFisica pf)
 {
     try
     {
         mdl.pessoaFisicas.Add(pf);
         mdl.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         throw;
     }
 }