Exemple #1
0
 public void Atualiza(Registro registro)
 {
     using (var context = new SophiaContext())
     {
         context.Entry(registro).State = System.Data.Entity.EntityState.Modified;
         context.SaveChanges();
     }
 }
Exemple #2
0
 public void Adiciona(Registro registro)
 {
     using (var context = new SophiaContext())
     {
         context.Registros.Add(registro);
         context.SaveChanges();
     }
 }