Thanks for your reply, Frans
Mmmm, let me expain a bit further my intentions. Like I said before I want to set up remoting. Here's the architecture I want set up via remoting:
Client code (UI - client machine)
Business Object layer (BOL) (Application Server)
Remoting web site (probably on application server)
DAL (LLGen classes) layer (Data store server)
The client code requests a business object from the application server. The business object encapsulats business rules and retrieving data from DAL layer. A expample business object would might have something like this:
(Name is a property in base class derived from field in SQL)
<Serializable()> _
Public Class MyObject
Inherits LGen.DAO.EntityClasses.MyObjectEntity 'Seperate assembly
Private m_adapter as New DataAdapter
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal Id As System.Int32)
MyBase.New(Id)
End Sub
Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
MyBase.New(info, context)
End Sub
' Do something
Public Shared Function SaveObject (ByVal Name As String) As Boolean
Me.Name = Name
if Me.ValidateName then
Return Me.m_adapter.SaveEntity(Me)
End If
End Function
'Simple validation for example purposes
Private Function ValidateName(ByVal stName as String) as Boolean
Return Not stName.Length.Eqauls(0)
End Function
End class
Remember, the UI code only has a reference to the BOL, so the business object must call apropiate methods via the adapter. The BOL has necessary references to the LLGen classes.
So, the bottom line is - can the business object be unanchored even though the DataAdapter class in not serializable and be passed to the UI code via remoting?
I haven't attempted remoting with LLGen so I'm asking for expert opinion now before I beat my head against the wall before trying to do something that's impossible.