Example #1
0
 public void Sil(Product product)
 {
     using (EtradeContext context = new EtradeContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Deleted;
         context.SaveChanges();
     }
 }
Example #2
0
 public void Guncelle(Product product)
 {
     using (EtradeContext context = new EtradeContext())
     {
         var entity = context.Entry(product);
         entity.State = EntityState.Modified;
         context.SaveChanges();
     }
 }