예제 #1
0
        public ActionResult Create(Education education)
        {
            if (ModelState.IsValid)
            {
                context.Educations.Add(education);
                context.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(education);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public ActionResult Edit(Education education)
 {
     if (ModelState.IsValid)
     {
         context.Entry(education).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(education);
 }