Is it possible to get a parent object's collection if you only have a parent entity the EntityBase of the collection? Hopefully this bit of code will make sense..
Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports SD.LLBLGen.Pro.ORMSupportClasses
Public Class EntityBaseJoiner(Of parentEntityType As EntityBase, collectionEntityType As EntityBase)
Public Function JoinBases(ByVal parentEntity As parentEntityType) As EntityCollectionBase(Of collectionEntityType)
' Fill in the blanks
Return Nothing
End Function
End Class
<TestClass()> Public Class EntityBaseJoinerTests
<TestMethod()> Public Sub EntitiesCanBeJoined()
Dim joiner As New EntityBaseJoiner(Of UserEntity, EmailAddressEntity)
Dim user As New UserEntity()
Assert.IsTrue(joiner.JoinBases(user) = user.EmailAddresss)
End Sub
End Class
Obviously I'm having trouble at the part where it says "Fill in the blank"... Maybe there's an easier way..