async public Task Update(object obj) { MainThemes mainThemes = obj as MainThemes; db.Entry(mainThemes).State = EntityState.Modified; await dbSave.Save(db); }
async public Task Update(object obj) { Forum forum = obj as Forum; db.Entry(forum).State = EntityState.Modified; await dbSave.Save(db); }
public async Task <ActionResult> Edit([Bind(Include = "ID,ForumID,Subject,ReplyCount,ContentText,PublichDate,CreateUser")] MainArticleModel mainArticleModel) { if (ModelState.IsValid) { db.Entry(mainArticleModel).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.ForumID = new SelectList(db.Categories, "ID", "ContentText", mainArticleModel.ForumID); return(View(mainArticleModel)); }