Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save motowilliams/1307757 to your computer and use it in GitHub Desktop.
Save motowilliams/1307757 to your computer and use it in GitHub Desktop.
Extension-Methods-Improving-the-quality-of-Life
foreach( var validationResult in validationResults )
{
bindingContext.ModelState
.AddModelError( validationResult.MemberNames.FirstOrDefault(), validationResult.ErrorMessage );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment