Beispiel #1
0
        public ActionResult Create([Bind(Exclude = "Id")] Movie movieToCreate)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(View());
                }

                _db.AddToMovies(movieToCreate);
                _db.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }