public ActionResult Create(InterviewQuestionCategory interviewquestioncategory) { if (ModelState.IsValid) { interviewquestioncategoryRepository.InsertOrUpdate(interviewquestioncategory); interviewquestioncategoryRepository.Save(); return RedirectToAction("Index"); } else { return View(interviewquestioncategory); } }
public ViewResult Search(InterviewQuestionCategory searchInterviewQuestionCategory) { if(searchInterviewQuestionCategory!=null) { } return View("Index",interviewquestioncategoryRepository.All); }
public ActionResult Create() { InterviewQuestionCategory interviewquestioncategory = new InterviewQuestionCategory(); return View(interviewquestioncategory); }
public void InsertOrUpdate(InterviewQuestionCategory interviewquestioncategory) { if (interviewquestioncategory.InterviewQuestionCategoryID == default(int)) { // New entity context.InterviewQuestionCategory.Add(interviewquestioncategory); } else { // Existing entity context.Entry(interviewquestioncategory).State = EntityState.Modified; } }