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

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