I'm a little confused by MSDN example.
It's not clear how to treat and set entity realted errors.
Code in example:
public System.Collections.IEnumerable GetErrors(string propertyName)
{
if (String.IsNullOrEmpty(propertyName) ||
!errors.ContainsKey(propertyName)) return null;
return errors[propertyName];
}
but documentation for GetErrors() states:
propertyName - The name of the property to retrieve validation errors for; or null or Empty, to retrieve entity-level errors.
Another example suggests just returning _errors.Values of the dictionary. And this is just all properties errors but again not entity errors.