예제 #1
0
        public ActionResult Create(BlogPost model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    _repo.Create(model);
                    return(RedirectToAction("Index"));
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }

            return(View(model));
        }