public async Task <TEntity> Update(TEntity entity) { context.Entry(entity).State = EntityState.Modified; await context.SaveChangesAsync(); return(entity); }
public ActionResult OkuyanGuncelle(Okuyan oky) { ctx.Entry(oky).State = EntityState.Modified; int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Index")); } return(View()); }
public ActionResult KitapGuncelle(Kitap ktp) { if (ModelState.IsValid) { ctx.Entry(ktp).State = EntityState.Modified; int sonuc = ctx.SaveChanges(); if (sonuc > 0) { return(RedirectToAction("Index")); } } return(View()); }