Example #1
0
 public void inserir(produtos pro)
 {
     using (AppBurguerPigEntities db =
                new AppBurguerPigEntities())
     {
         db.produtos.Add(pro);
         db.SaveChanges();
     }
 }
Example #2
0
 public void excluir(produtos pro)
 {
     using (AppBurguerPigEntities db =
                new AppBurguerPigEntities())
     {
         db.Entry(pro).State =
             System.Data.Entity.EntityState.Deleted;
         db.SaveChanges();
     }
 }
Example #3
0
 public void alterar(produtos pro)
 {
     using (AppBurguerPigEntities db =
                new AppBurguerPigEntities())
     {
         db.Entry(pro).State =
             System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
     }
 }