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!"); }
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!")); }