예제 #1
0
        public ActionResult Create(Firm firm)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    firmData.Insert(firm);
                    firmData.Commit();

                    return(RedirectToAction(nameof(Index)));
                }

                return(View(firm));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(QuestionAnswer questionAnswer)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    questionAnswerData.Insert(questionAnswer);
                    questionAnswerData.Commit();

                    return(RedirectToAction(nameof(Index)));
                }

                return(View(questionAnswer));
            }
            catch
            {
                return(View());
            }
        }