public void alterar(devolucao dev) { using (locadoraEntities1 db = new locadoraEntities1()) { db.Entry(dev).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
public void excluir(devolucao dev) { using (locadoraEntities1 db = new locadoraEntities1()) { db.Entry(dev).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); } }
public void inserir(devolucao dev) { using (locadoraEntities1 db = new locadoraEntities1()) { db.devolucao.Add(dev); db.SaveChanges(); } }
public devolucao selecionar(int codigo) { devolucao dev = null; using (locadoraEntities1 db = new locadoraEntities1()) { dev = (from devolucao in db.devolucao where devolucao.devolucao_codigo == codigo select devolucao).FirstOrDefault(); } return(dev); }