예제 #1
0
        private void ApplyChanges(EntityEntry securityEntityEntry, EntityEntry realEntityEntry)
        {
            IEnumerable <PropertyEntry> securityProperties = securityEntityEntry.GetProperties();
            IEnumerable <PropertyEntry> realProperties     = realEntityEntry.GetProperties();

            foreach (PropertyEntry propertyEntry in securityProperties)
            {
                if (!propertyEntry.Metadata.IsKey())
                {
                    continue;
                }
                PropertyEntry securityPropertyEntry = propertyEntry;
                PropertyEntry realPropertyEntry     = realProperties.First(p => p.Metadata.Name == securityPropertyEntry.Metadata.Name);
                ApplyChanges(securityPropertyEntry, realPropertyEntry);
            }
        }