Inheritance: System.Entity
コード例 #1
0
        public ActionResult Create(Sponsor sponsor, string cancelButton)
        {
            try
            {
                if (String.IsNullOrEmpty(cancelButton))
                {
                    _repository.Save(sponsor);
                }

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }
コード例 #2
0
        public ActionResult Edit(Sponsor sponsor, string cancelButton)
        {
            try
            {
                if (String.IsNullOrEmpty(cancelButton))
                {
                    //var logoUrl = SaveLogo();
                    _repository.Save(sponsor);
                }

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