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