Esempio n. 1
0
 public void Guncelle(Order order)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(order);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Sil(Product product)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
Esempio n. 3
0
 public void Sil(Order order)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(order);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
Esempio n. 4
0
 public void Guncelle(Product product) //Model Binding
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }