public ActionResult Create(SkillsExpEdu skillsexpedu) { if (ModelState.IsValid) { skillsexpeduRepository.InsertOrUpdate(skillsexpedu); skillsexpeduRepository.Save(); return RedirectToAction("Index"); } else { ViewBag.PossibleSkillsExpEduCategories = skillsexpeducategoryRepository.All; return View(skillsexpedu); } }
public ViewResult Search(SkillsExpEdu searchSkillsExpEdu) { if(searchSkillsExpEdu!=null) { } return View("Index",skillsexpeduRepository.AllIncluding(skillsexpedu => skillsexpedu.SkillsExpEduCategory)); }
public ActionResult Create() { SkillsExpEdu skillsexpedu = new SkillsExpEdu(); ViewBag.PossibleSkillsExpEduCategories = skillsexpeducategoryRepository.All; return View(skillsexpedu); }
public void InsertOrUpdate(SkillsExpEdu skillsexpedu) { if (skillsexpedu.SkillsExpEduID == default(int)) { // New entity context.SkillsExpEdu.Add(skillsexpedu); } else { // Existing entity context.Entry(skillsexpedu).State = EntityState.Modified; } }