예제 #1
0
 public void alterar(devolucao dev)
 {
     using (locadoraEntities1 db = new locadoraEntities1())
     {
         db.Entry(dev).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #2
0
 public void excluir(devolucao dev)
 {
     using (locadoraEntities1 db = new locadoraEntities1())
     {
         db.Entry(dev).State = System.Data.Entity.EntityState.Deleted;
         db.SaveChanges();
     }
 }
예제 #3
0
 public void inserir(devolucao dev)
 {
     using (locadoraEntities1 db = new locadoraEntities1())
     {
         db.devolucao.Add(dev);
         db.SaveChanges();
     }
 }
예제 #4
0
        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);
        }