/// <summary> /// Creates a <see cref="DbCollectionEntry{TEntity,TElement}" /> from information in the given /// <see /// cref="InternalCollectionEntry" /> /// . /// Use this method in preference to the constructor since it may potentially create a subclass depending on /// the type of member represented by the InternalCollectionEntry instance. /// </summary> /// <param name="internalCollectionEntry"> The internal collection entry. </param> /// <returns> The new entry. </returns> internal static DbCollectionEntry <TEntity, TElement> Create(InternalCollectionEntry internalCollectionEntry) { DebugCheck.NotNull(internalCollectionEntry); // Note that the implementation of this Create method is different than for the other DbMemberEntry classes. // This is because the DbMemberEntry is defined in terms of the ICollection<TElement> while this class // is defined in terms of just TElement. This means that we can't just call the CreateDbMemberEntry factory // method on InternalMemberEntry. Instead we call the special factory method on InternalCollectionEntry. return(internalCollectionEntry.CreateDbCollectionEntry <TEntity, TElement>()); }
internal static DbCollectionEntry <TEntity, TElement> Create( InternalCollectionEntry internalCollectionEntry) { return(internalCollectionEntry.CreateDbCollectionEntry <TEntity, TElement>()); }