public ActionResult Create(Quiz quizInfo) { try { Quiz newQuiz = new Quiz() { CourseID = 1, CreatedDate = DateTime.Now, IsActive = true, UserID = 1, }; OperationResult opResult = _repQuiz.AddItem(newQuiz); if (opResult.IsFailed) { //error message }//end if } catch (Exception) { return Redirect("/Quiz/Create"); } return Redirect("/Home/Index"); }//end method