public void DbMemberEntry_Create_can_be_called_from_multiple_threads() { ExecuteInParallel( () => { var collectionMetadata = new NavigationEntryMetadata( typeof(FakeWithProps), typeof(FakeEntity), "Collection", isCollection: true); var internalEntry = new InternalCollectionEntry( new Mock <InternalEntityEntryForMock <FakeEntity> >().Object, collectionMetadata); var entry = internalEntry.CreateDbMemberEntry <FakeWithProps, ICollection <FakeEntity> >(); Assert.IsAssignableFrom <DbMemberEntry <FakeWithProps, ICollection <FakeEntity> > >(entry); }); }
// <summary> // Creates a <see cref="DbCollectionEntry" /> 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 Create(InternalCollectionEntry internalCollectionEntry) { DebugCheck.NotNull(internalCollectionEntry); return((DbCollectionEntry)internalCollectionEntry.CreateDbMemberEntry()); }
internal static DbCollectionEntry Create( InternalCollectionEntry internalCollectionEntry) { return((DbCollectionEntry)internalCollectionEntry.CreateDbMemberEntry()); }