public async Task <bool> Update(Job job) { _context.Entry(job).State = EntityState.Modified; await _context.SaveChangesAsync(); return(true); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name")] Watchlist watchlist) { if (ModelState.IsValid) { watchlist.ModifiedDate = DateTime.Now; db.Entry(watchlist).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(watchlist)); }