public void Remove(int Id) { MemberApp p = context.MemberApps.Find(Id); context.MemberApps.Remove(p); context.SaveChanges(); }
public ActionResult Edit([Bind(Include = "Id,Name,Email,Phone,MaritalStatus,State,City")] MemberApp memberApp) { if (ModelState.IsValid) { db.Edit(memberApp); return(RedirectToAction("Index")); } return(View(memberApp)); }
// GET: MemberApps/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MemberApp memberApp = db.FindById(Convert.ToInt32(id)); if (memberApp == null) { return(HttpNotFound()); } return(View(memberApp)); }
public void Edit(MemberApp p) { context.Entry(p).State = System.Data.Entity.EntityState.Modified; }
public void Add(MemberApp p) { context.MemberApps.Add(p); context.SaveChanges(); }