예제 #1
0
        public ActionResult Create([Bind(Include = "Id,Question,Answer,SortOrder")] FAQ fAQ)
        {
            fAQ.SortOrder = _dc.GetNextFAQSortOrder();
            if (ModelState.IsValid)
            {
                db.FAQs.Add(fAQ);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(fAQ));
        }