Ejemplo n.º 1
0
 public void Remove(IngredienteLanche ingLanche)
 {
     using (var contexto = new LancheContext())
     {
         contexto.Entry(ingLanche).State = EntityState.Deleted;
         contexto.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void Adiciona(IngredienteLanche inglanche)
 {
     using (var context = new LancheContext())
     {
         context.IngredienteLanche.Add(inglanche);
         context.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void Atualiza(IngredienteLanche inglanche)
 {
     using (var contexto = new LancheContext())
     {
         contexto.Entry(inglanche).State = EntityState.Modified;
         contexto.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public void Adiciona(Lanche lanche)
 {
     using (var context = new LancheContext())
     {
         context.Lanches.Add(lanche);
         context.SaveChanges();
     }
 }