Beispiel #1
0
 public void Atualiza(IngredienteLanche inglanche)
 {
     using (var contexto = new LancheContext())
     {
         contexto.Entry(inglanche).State = EntityState.Modified;
         contexto.SaveChanges();
     }
 }
Beispiel #2
0
 public void Remove(IngredienteLanche ingLanche)
 {
     using (var contexto = new LancheContext())
     {
         contexto.Entry(ingLanche).State = EntityState.Deleted;
         contexto.SaveChanges();
     }
 }
Beispiel #3
0
 public void Adiciona(IngredienteLanche inglanche)
 {
     using (var context = new LancheContext())
     {
         context.IngredienteLanche.Add(inglanche);
         context.SaveChanges();
     }
 }