private GraphContainer GetGraphContainer(Key key, TypeInfo type, bool exactType)
        {
            var newTaskContainer        = new GraphContainer(key, type, exactType, this);
            var registeredTaskContainer = graphContainers[newTaskContainer];

            if (registeredTaskContainer == null)
            {
                _ = graphContainers.Add(newTaskContainer);
                return(newTaskContainer);
            }
            return(registeredTaskContainer);
        }
        private bool TrySetCachedColumnIndexes(
            GraphContainer container, IEnumerable <PrefetchFieldDescriptor> descriptors, EntityState state)
        {
            var result = false;

            if (container.RootEntityContainer == null)
            {
                GetCachedColumnIndexes(container.Type, descriptors, out var columns, out var columnsToBeLoaded);
                container.CreateRootEntityContainer(columns, state == null ? columnsToBeLoaded : null);
                result = true;
            }
            return(result);
        }
 public bool Equals(GraphContainer other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     if (!Type.Equals(other.Type))
     {
         return(false);
     }
     return(Key.Equals(other.Key));
 }