コード例 #1
0
		public ActionResult Add(PersonModel model)
		{
			if (this.SaveObject<IPerson>(model.ModelObject) != null)
			{
				return this.RedirectToAction("Index");
			}
			return this.View(model);
		}
コード例 #2
0
		public ActionResult Add()
		{
			var model = new PersonModel(this.PersonFactory.Create());
			return this.View(model);
		}
コード例 #3
0
		public ActionResult Edit(int id)
		{
			var model = new PersonModel(this.PersonFactory.Fetch(id));
			return this.View(model);
		}