public async Task <ActionResult> Edit([Bind(Include = "PersonalId,Name,LastName,Email,IsDeleted,Phone")] Personal personal) { if (ModelState.IsValid) { db.Entry(personal).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(personal)); }
public async Task <ActionResult> Edit([Bind(Include = "EventId,PersonalId,Name,Description,EventDate,IsPrivate,DateCreated,Status,IsDeleted")] Event @event) { if (ModelState.IsValid) { db.Entry(@event).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.PersonalId = new SelectList(db.Personal, "PersonalId", "Name", @event.PersonalId); return(View(@event)); }