コード例 #1
0
        public ActionResult Create(int id, [Bind("Name", "Lontitude", "Latitude", "OpeningHour", "ClosingHour")] Cinema store)
        {
            try
            {
                var errorMessage = StoreValidation(store);

                if (!string.IsNullOrWhiteSpace(errorMessage))
                {
                    return(RedirectToAction("Index", "Error", new { error = errorMessage }));
                }

                _storeBl.AddStore(store);
                return(RedirectToAction("Index", "About"));
            }
            catch
            {
                return(RedirectToAction("Index", "Error"));
            }
        }