Пример #1
0
        public ActionResult Insert(VerseModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View());
            }
            VerseService vs = new VerseService(model);

            vs.InsertVerse();
            return(View());
        }
Пример #2
0
        public ActionResult Insert(VerseModel model)
        {
            if (!ModelState.IsValid)
            {
                ViewBag.Message = "This verse was already added previously!";
                return(View("Index"));
            }

            VerseService service = new VerseService(model);

            service.InsertVerse();
            ViewBag.Message = "You have added: " + model.Book + " " + model.Chapter + ":" + model.Verse + " to the app!";
            return(View("Index"));
        }