I'm building a DLL with several "master" objects that need access to the app LINQ DataContext. The DLL will serve several projects with different dataContexts, so I need the DLL can call the object that it's inside the EXE.
What is the best or elegant way to do it?
Edit: Clarification
Code example of what I'm trying to do:
'DLL
'---
Public MustInherit Class MasterObject(Of T As Class)
Friend db As DataContext
Public Sub New()
'How do I do something like this?
db = New DataContextInTheExe()
End Sub
...
Public MustOverride Sub Save()
end class
'In the Exe
'---
Public Class Order
Inherits MasterObject(Of Order)
Public Overrides Sub Save()
...
Me.db.SubmitChanges()
End Sub
end class