public ActionResult Edit(int id, update update) { try { update.modifiedon = DateTime.Now; update.createdby = User.Identity.Name; conn.Entry(update).State = EntityState.Modified; conn.SaveChanges(); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(int id, client client) { try { client.modifiedon = DateTime.Now; conn.Entry(client).State = EntityState.Modified; conn.SaveChanges();// TODO: Add update logic here return(RedirectToAction("Index")); } catch { return(View()); } }