Beispiel #1
0
        public virtual IEnumerable <DbValidationError> GetValidationErrors()
        {
            ValidationProvider validationProvider = this.InternalEntityEntry.InternalContext.ValidationProvider;
            PropertyValidator  propertyValidator  = validationProvider.GetPropertyValidator(this._internalEntityEntry, this);

            if (propertyValidator == null)
            {
                return(Enumerable.Empty <DbValidationError>());
            }
            return(propertyValidator.Validate(validationProvider.GetEntityValidationContext(this._internalEntityEntry, (IDictionary <object, object>)null), this));
        }