public ActionResult Create(Education education) { if (ModelState.IsValid) { context.Educations.Add(education); context.SaveChanges(); return RedirectToAction("Index"); } return View(education); }
public ActionResult AddInline(Education education) { if (ModelState.IsValid) { context.Educations.Add(education); context.SaveChanges(); } List<Education> edus = (from e in context.Educations where e.CandidateId == education.CandidateId select e).ToList(); return PartialView("ListInline", edus); }
public ActionResult Edit(Education education) { if (ModelState.IsValid) { context.Entry(education).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(education); }