Hi Rocky,
The msdn documentation gives this description for INotifyDataErrorInfo.GetErrors(string propertyName)
Gets the validation errors for a specified property *or for the entire entity*.
The current implementation in Csla.Core.BusinessBase will not return errors for the entire entity if propertyName = string.Empty
System.Collections.IEnumerable INotifyDataErrorInfo.GetErrors(string propertyName)
{
return BusinessRules.GetBrokenRules()
.Where(c => c.Property == propertyName && c.Severity == RuleSeverity.Error)
.ToList();
}
The following modification would:
System.Collections.IEnumerable INotifyDataErrorInfo.GetErrors(string propertyName)
{
return BusinessRules.GetBrokenRules()
.Where(c => (string.IsNullOrEmpty(propertyName) || c.Property == propertyName) && c.Severity == RuleSeverity.Error)
.ToList();
}
Shall I raise an issue on bugtracker?
Regards
Peran
Yes, please add this as a bug, thanks
Copyright (c) Marimer LLC