public ActionResult Edit([Bind(Include = "employeeID,firstName,lastName,email,phone,employeeSince")] TheProfile theProfile) { if (ModelState.IsValid) { db.Entry(theProfile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(theProfile)); }
public ActionResult Create([Bind(Include = "employeeID,firstName,lastName,email,phone,employeeSince")] TheProfile theProfile) { if (ModelState.IsValid) { db.TheProfiles.Add(theProfile); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(theProfile)); }
// GET: TheProfiles/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TheProfile theProfile = db.TheProfiles.Find(id); if (theProfile == null) { return(HttpNotFound()); } return(View(theProfile)); }