示例#1
0
 public void Guncelle(Order order)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(order);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }
示例#2
0
 public void Sil(Product product)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
示例#3
0
 public void Sil(Order order)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(order);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
示例#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();
     }
 }