Esempio n. 1
0
        public ActionResult Create(EventViewModel model)
        {
            ViewBag.Message = "Your Event";

            if (ModelState.IsValid)
            {
                if (new EventManager().AddEvent(model.GetAsEvent()))
                {
                    return(RedirectToAction("Index", "Home"));
                }
            }

            // If we got this far, something failed, redisplay form
            return(View(model));
        }