Пример #1
0
        public ActionResult Create(Trait model)
        {
            if (!ModelState.IsValid)
            {
                return View();
            }

            DataSession.Save(model);

            return RedirectToAction("Index");
        }
Пример #2
0
        public ActionResult Edit(Trait model)
        {
            if (model == null)
                return HttpNotFound();

            if(!ModelState.IsValid)
            {
                return View();
            }

            DataSession.Merge(model);

            return RedirectToAction("Index");
        }