Esempio n. 1
0
 public void Ekle(GetOrder getOrder) //Model Binding
 {
     using (EMarketContext context = new EMarketContext())
     {
         context.GetOrders.Add(getOrder);
         context.SaveChanges();
     }
 }
Esempio n. 2
0
 public void Sil(GetOrder getOrder)
 {
     using (EMarketContext context = new EMarketContext())
     {
         var entity = context.Entry(getOrder);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }