public void Novo(Correntista registro) { try { using (var db = new terminalEntities()) { db.Correntistas.Add(registro); db.SaveChanges(); } } catch (Exception) { throw; } }
public void Excluir(Correntista registro) { try { using (var db = new terminalEntities()) { db.Entry(registro).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); } } catch (Exception) { throw; } }
public void Salvar(Conta registro) { try { using (var db = new terminalEntities()) { db.Entry(registro).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } } catch (Exception) { throw; } }