public ActionResult Create(Startup startup)
        {
            startup.Active = true;

            try {
                workOnDelegate(work => {
                    work.Insert(startup);
                    work.Commit();
                });
                return RedirectToAction("Show");
            } catch {
                return View();
            }
        }
示例#2
0
        public ActionResult Create(Startup startup)
        {
            startup.Active = true;
            startup.Associates.Add(GetFounderName());

            try
            {
                workOnDelegate(work =>
                                   {
                                       work.Insert(startup);
                                       work.Commit();
                                   });
                return RedirectToAction("Show");
            }
            catch
            {
                return View();
            }
        }