예제 #1
0
		public ActionResult Index(BenchmarkFormViewModel model)
		{
			if (model.Name != "asdf")
				throw new InvalidOperationException("Invalid Name");
			if (model.Address != "jkl")
				throw new InvalidOperationException("Invalid Address");
			if (model.Age != 123)
				throw new InvalidOperationException("Invalid Age");
			if (!model.CreateDate.HasValue || model.CreateDate.Value != expected)
				throw new InvalidOperationException("Invalid Date");
			return Content("Thanks!");
		}
예제 #2
0
 public ActionResult Index(BenchmarkFormViewModel model)
 {
     if (model.Name != "asdf")
     {
         throw new InvalidOperationException("Invalid Name");
     }
     if (model.Address != "jkl")
     {
         throw new InvalidOperationException("Invalid Address");
     }
     if (model.Age != 123)
     {
         throw new InvalidOperationException("Invalid Age");
     }
     if (!model.CreateDate.HasValue || model.CreateDate.Value != expected)
     {
         throw new InvalidOperationException("Invalid Date");
     }
     return(Content("Thanks!"));
 }