public void Update(TEntity item) { if (item == null) { return; } Db.Entry(item).State = EntityState.Modified; }
public async Task <ActionResult> Edit([Bind(Include = "ID,機体番号,機体名,登場作品")] MS_TBL mS_TBL) { if (ModelState.IsValid) { db.Entry(mS_TBL).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(mS_TBL)); }