Hi
I noticed that when I loop through the BrokenRulesCollection the order appears to be somewhat random. e.g.
if (!model.IsValid)
{
foreach (BrokenRule brokenRule in model.BrokenRulesCollection)
{
ModelState.AddModelError(brokenRule.Property, brokenRule.Description);
}
return View(model);
}
Is the order something I can determine in the business class?
Thanks
Andrew
No, the order is indeterminate. However, you can always use a LINQ query to sort the list as you see fit.
Copyright (c) Marimer LLC