public ActionResult Edit([Bind(Include = "UserId,RoleId,MemberName,RoleName")] ASPNetUserRoles aSPNetUserRoles) { if (ModelState.IsValid) { db.Entry(aSPNetUserRoles).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(aSPNetUserRoles)); }
public ActionResult Edit([Bind(Include = "EventId,ChapterId,EventDate,EventTitle,DateModified,DateCreated")] Event @event) { CreateChapterDD(); @event.DateModified = System.DateTime.Now; @event.DateCreated = @event.DateCreated; var chapterId = Request.Form["ChapterId"].ToString(); @event.ChapterId = Convert.ToInt32(chapterId); if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(@event)); }