Exemple #1
0
        private static void DetectPropertyChanges(InternalEntityEntry entry)
        {
            var entityType = entry.EntityType;

            if (entityType.HasPropertyChangedNotifications())
            {
                return;
            }

            foreach (var property in entityType.GetProperties())
            {
                if ((property.GetOriginalValueIndex() >= 0) &&
                    !Equals(entry[property], entry.GetOriginalValue(property)))
                {
                    entry.SetPropertyModified(property);
                }
            }
        }