示例#1
0
        internal bool CommitPropertyCore(EntityProperty property)
        {
            if (this.Owner.ValidationMode == ValidationMode.OnCommit)
            {
                if (this.ValidateProperty(property))
                {
                    property.Commit();
                    return(true);
                }
            }
            else
            {
                if (this.errors.ContainsKey(property.PropertyName))
                {
                    if (this.errors[property.PropertyName].Count == 0)
                    {
                        property.Commit();
                        return(true);
                    }
                }
                else
                {
                    property.Commit();
                    return(true);
                }
            }

            return(false);
        }