Esempio n. 1
0
            private static IEnumerable <Property> GetProperties(EntityEntryData @this)
            {
                if (@this.Properties != null)
                {
                    foreach (var entry in @this.Properties)
                    {
                        yield return new Property {
                                   Key      = entry.Key,
                                   Value    = entry.Value,
                                   Modified = @this.ModifiedProperties != null &&
                                              @this.ModifiedProperties.TryGetValue(entry.Key, out var value) ?
                                              new Modified {
                                       Value = value
                                   } : Missing
                        }
                    }
                }
                ;

                if (@this.ModifiedProperties != null)
                {
                    foreach (var entry in @this.ModifiedProperties)
                    {
                        if (@this.Properties?.ContainsKey(entry.Key) != true)
                        {
                            yield return new Property {
                                       Key      = entry.Key,
                                       Modified = new Modified {
                                           Value = entry.Value
                                       }
                            }
                        }
                    }
                }
                ;

                if (@this.NavigationState != null)
                {
                    foreach (var entry in @this.NavigationState)
                    {
                        yield return new Property {
                                   Key   = entry,
                                   Value = IsLoaded
                        }
                    }
                }
                ;
            }
Esempio n. 2
0
 public DebugView(EntityEntryData entry) => @this = entry;