Public Class Category Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_CategoryName As System.String Private m_Description As System.String Private m_Picture As System.Byte() Private m_Products As System.Collections.ArrayList = New System.Collections.ArrayList 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property CategoryName() As System.String Get Return m_CategoryName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CategoryName", Value) m_CategoryName = Value End Set End Property Public Overridable Property Description() As System.String Get Return m_Description End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Description", Value) m_Description = Value End Set End Property Public Overridable Property Picture() As System.Byte() Get Return m_Picture End Get Set(ByVal Value As System.Byte()) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Picture", Value) m_Picture = Value End Set End Property Public Overridable Property Products() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Products") Return m_Products End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Products", Value) m_Products = Value End Set End Property 'Interface implementations ''IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "categoryname" Return m_CategoryName Case "description" Return m_Description Case "picture" Return m_Picture Case "products" Return m_Products Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = value Case "categoryname" m_CategoryName = value Case "description" m_Description = value Case "picture" m_Picture = value Case "products" m_Products = value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Customer Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.String Private m_Address As System.String Private m_City As System.String Private m_CompanyName As System.String Private m_ContactName As System.String Private m_ContactTitle As System.String Private m_Country As System.String Private m_CustomerDemographics As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Fax As System.String Private m_Orders As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Phone As System.String Private m_PostalCode As System.String Private m_Region As System.String 'Public properties Public Overridable Property Id() As System.String Get Return m_Id End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Id", Value) m_Id = Value End Set End Property Public Overridable Property Address() As System.String Get Return m_Address End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Address", Value) m_Address = Value End Set End Property Public Overridable Property City() As System.String Get Return m_City End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "City", Value) m_City = Value End Set End Property Public Overridable Property CompanyName() As System.String Get Return m_CompanyName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CompanyName", Value) m_CompanyName = Value End Set End Property Public Overridable Property ContactName() As System.String Get Return m_ContactName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ContactName", Value) m_ContactName = Value End Set End Property Public Overridable Property ContactTitle() As System.String Get Return m_ContactTitle End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ContactTitle", Value) m_ContactTitle = Value End Set End Property Public Overridable Property Country() As System.String Get Return m_Country End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Country", Value) m_Country = Value End Set End Property Public Overridable Property CustomerDemographics() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "CustomerDemographics") Return m_CustomerDemographics End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CustomerDemographics", Value) m_CustomerDemographics = Value End Set End Property Public Overridable Property Fax() As System.String Get Return m_Fax End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Fax", Value) m_Fax = Value End Set End Property Public Overridable Property Orders() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Orders") Return m_Orders End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Orders", Value) m_Orders = Value End Set End Property Public Overridable Property Phone() As System.String Get Return m_Phone End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Phone", Value) m_Phone = Value End Set End Property Public Overridable Property PostalCode() As System.String Get Return m_PostalCode End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "PostalCode", Value) m_PostalCode = Value End Set End Property Public Overridable Property Region() As System.String Get Return m_Region End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Region", Value) m_Region = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "address" Return m_Address Case "city" Return m_City Case "companyname" Return m_CompanyName Case "contactname" Return m_ContactName Case "contacttitle" Return m_ContactTitle Case "country" Return m_Country Case "customerdemographics" Return m_CustomerDemographics Case "fax" Return m_Fax Case "orders" Return m_Orders Case "phone" Return m_Phone Case "postalcode" Return m_PostalCode Case "region" Return m_Region Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "address" m_Address = Value Case "city" m_City = Value Case "companyname" m_CompanyName = Value Case "contactname" m_ContactName = Value Case "contacttitle" m_ContactTitle = Value Case "country" m_Country = Value Case "customerdemographics" m_CustomerDemographics = Value Case "fax" m_Fax = Value Case "orders" m_Orders = Value Case "phone" m_Phone = Value Case "postalcode" m_PostalCode = Value Case "region" m_Region = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class CustomerDemographic Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'CustomerDemographic' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.String Private m_CustomerDesc As System.String Private m_Customers As MatsSoft.NPersist.Framework.ManagedList = New MatsSoft.NPersist.Framework.ManagedList(Me, "Customers") 'Public properties Public Overridable Property Id() As System.String Get Return m_Id End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Id", Value) m_Id = Value End Set End Property Public Overridable Property CustomerDesc() As System.String Get Return m_CustomerDesc End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CustomerDesc", Value) m_CustomerDesc = Value End Set End Property Public Overridable Property Customers() As MatsSoft.NPersist.Framework.ManagedList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Customers") Return m_Customers End Get Set(ByVal Value As MatsSoft.NPersist.Framework.ManagedList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Customers", Value) m_Customers = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "customerdesc" Return m_CustomerDesc Case "customers" Return m_Customers Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = value Case "customerdesc" m_CustomerDesc = value Case "customers" m_Customers = value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Employee Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Employee' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_Address As System.String Private m_BirthDate As System.DateTime Private m_City As System.String Private m_Country As System.String Private m_Employees As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Extension As System.String Private m_FirstName As System.String Private m_HireDate As System.DateTime Private m_HomePhone As System.String Private m_LastName As System.String Private m_Notes As System.String Private m_Orders As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Photo As System.Byte() Private m_PhotoPath As System.String Private m_PostalCode As System.String Private m_Region As System.String Private m_ReportsTo As Employee Private m_Territories As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Title As System.String Private m_TitleOfCourtesy As System.String 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property Address() As System.String Get Return m_Address End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Address", Value) m_Address = Value End Set End Property Public Overridable Property BirthDate() As System.DateTime Get Return m_BirthDate End Get Set(ByVal Value As System.DateTime) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "BirthDate", Value) m_BirthDate = Value End Set End Property Public Overridable Property City() As System.String Get Return m_City End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "City", Value) m_City = Value End Set End Property Public Overridable Property Country() As System.String Get Return m_Country End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Country", Value) m_Country = Value End Set End Property Public Overridable Property Employees() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Employees") Return m_Employees End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Employees", Value) m_Employees = Value End Set End Property Public Overridable Property Extension() As System.String Get Return m_Extension End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Extension", Value) m_Extension = Value End Set End Property Public Overridable Property FirstName() As System.String Get Return m_FirstName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "FirstName", Value) m_FirstName = Value End Set End Property Public Overridable Property HireDate() As System.DateTime Get Return m_HireDate End Get Set(ByVal Value As System.DateTime) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "HireDate", Value) m_HireDate = Value End Set End Property Public Overridable Property HomePhone() As System.String Get Return m_HomePhone End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "HomePhone", Value) m_HomePhone = Value End Set End Property Public Overridable Property LastName() As System.String Get Return m_LastName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "LastName", Value) m_LastName = Value End Set End Property Public Overridable Property Notes() As System.String Get Return m_Notes End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Notes", Value) m_Notes = Value End Set End Property Public Overridable Property Orders() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Orders") Return m_Orders End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Orders", Value) m_Orders = Value End Set End Property Public Overridable Property Photo() As System.Byte() Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Photo") Return m_Photo End Get Set(ByVal Value As System.Byte()) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Photo", Value) m_Photo = Value End Set End Property Public Overridable Property PhotoPath() As System.String Get Return m_PhotoPath End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "PhotoPath", Value) m_PhotoPath = Value End Set End Property Public Overridable Property PostalCode() As System.String Get Return m_PostalCode End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "PostalCode", Value) m_PostalCode = Value End Set End Property Public Overridable Property Region() As System.String Get Return m_Region End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Region", Value) m_Region = Value End Set End Property Public Overridable Property ReportsTo() As Employee Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "ReportsTo") Return m_ReportsTo End Get Set(ByVal Value As Employee) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ReportsTo", Value) m_ReportsTo = Value End Set End Property Public Overridable Property Territories() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Territories") Return m_Territories End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Territories", Value) m_Territories = Value End Set End Property Public Overridable Property Title() As System.String Get Return m_Title End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Title", Value) m_Title = Value End Set End Property Public Overridable Property TitleOfCourtesy() As System.String Get Return m_TitleOfCourtesy End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "TitleOfCourtesy", Value) m_TitleOfCourtesy = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "address" Return m_Address Case "birthdate" Return m_BirthDate Case "city" Return m_City Case "country" Return m_Country Case "employees" Return m_Employees Case "extension" Return m_Extension Case "firstname" Return m_FirstName Case "hiredate" Return m_HireDate Case "homephone" Return m_HomePhone Case "lastname" Return m_LastName Case "notes" Return m_Notes Case "orders" Return m_Orders Case "photo" Return m_Photo Case "photopath" Return m_PhotoPath Case "postalcode" Return m_PostalCode Case "region" Return m_Region Case "reportsto" Return m_ReportsTo Case "territories" Return m_Territories Case "title" Return m_Title Case "titleofcourtesy" Return m_TitleOfCourtesy Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "address" m_Address = Value Case "birthdate" m_BirthDate = Value Case "city" m_City = Value Case "country" m_Country = Value Case "employees" m_Employees = Value Case "extension" m_Extension = Value Case "firstname" m_FirstName = Value Case "hiredate" m_HireDate = Value Case "homephone" m_HomePhone = Value Case "lastname" m_LastName = Value Case "notes" m_Notes = Value Case "orders" m_Orders = Value Case "photo" m_Photo = Value Case "photopath" m_PhotoPath = Value Case "postalcode" m_PostalCode = Value Case "region" m_Region = Value Case "reportsto" m_ReportsTo = Value Case "territories" m_Territories = Value Case "title" m_Title = Value Case "titleofcourtesy" m_TitleOfCourtesy = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Order Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Order' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_Customer As Customer Private m_Employee As Employee Private m_Freight As System.Decimal Private m_OrderDate As System.DateTime Private m_OrderDetails As System.Collections.ArrayList = New System.Collections.ArrayList Private m_RequiredDate As System.DateTime Private m_ShipAddress As System.String Private m_ShipCity As System.String Private m_ShipCountry As System.String Private m_ShipName As System.String Private m_ShipPostalCode As System.String Private m_ShipRegion As System.String Private m_ShipVia As Shipper Private m_ShippedDate As System.DateTime 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property Customer() As Customer Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Customer") Return m_Customer End Get Set(ByVal Value As Customer) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Customer", Value) m_Customer = Value End Set End Property Public Overridable Property Employee() As Employee Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Employee") Return m_Employee End Get Set(ByVal Value As Employee) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Employee", Value) m_Employee = Value End Set End Property Public Overridable Property Freight() As System.Decimal Get Return m_Freight End Get Set(ByVal Value As System.Decimal) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Freight", Value) m_Freight = Value End Set End Property Public Overridable Property OrderDate() As System.DateTime Get Return m_OrderDate End Get Set(ByVal Value As System.DateTime) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "OrderDate", Value) m_OrderDate = Value End Set End Property Public Overridable Property OrderDetails() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "OrderDetails") Return m_OrderDetails End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "OrderDetails", Value) m_OrderDetails = Value End Set End Property Public Overridable Property RequiredDate() As System.DateTime Get Return m_RequiredDate End Get Set(ByVal Value As System.DateTime) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "RequiredDate", Value) m_RequiredDate = Value End Set End Property Public Overridable Property ShipAddress() As System.String Get Return m_ShipAddress End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipAddress", Value) m_ShipAddress = Value End Set End Property Public Overridable Property ShipCity() As System.String Get Return m_ShipCity End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipCity", Value) m_ShipCity = Value End Set End Property Public Overridable Property ShipCountry() As System.String Get Return m_ShipCountry End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipCountry", Value) m_ShipCountry = Value End Set End Property Public Overridable Property ShipName() As System.String Get Return m_ShipName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipName", Value) m_ShipName = Value End Set End Property Public Overridable Property ShipPostalCode() As System.String Get Return m_ShipPostalCode End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipPostalCode", Value) m_ShipPostalCode = Value End Set End Property Public Overridable Property ShipRegion() As System.String Get Return m_ShipRegion End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipRegion", Value) m_ShipRegion = Value End Set End Property Public Overridable Property ShipVia() As Shipper Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "ShipVia") Return m_ShipVia End Get Set(ByVal Value As Shipper) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShipVia", Value) m_ShipVia = Value End Set End Property Public Overridable Property ShippedDate() As System.DateTime Get Return m_ShippedDate End Get Set(ByVal Value As System.DateTime) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ShippedDate", Value) m_ShippedDate = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "customer" Return m_Customer Case "employee" Return m_Employee Case "freight" Return m_Freight Case "orderdate" Return m_OrderDate Case "orderdetails" Return m_OrderDetails Case "requireddate" Return m_RequiredDate Case "shipaddress" Return m_ShipAddress Case "shipcity" Return m_ShipCity Case "shipcountry" Return m_ShipCountry Case "shipname" Return m_ShipName Case "shippostalcode" Return m_ShipPostalCode Case "shipregion" Return m_ShipRegion Case "shipvia" Return m_ShipVia Case "shippeddate" Return m_ShippedDate Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "customer" m_Customer = Value Case "employee" m_Employee = Value Case "freight" m_Freight = Value Case "orderdate" m_OrderDate = Value Case "orderdetails" m_OrderDetails = Value Case "requireddate" m_RequiredDate = Value Case "shipaddress" m_ShipAddress = Value Case "shipcity" m_ShipCity = Value Case "shipcountry" m_ShipCountry = Value Case "shipname" m_ShipName = Value Case "shippostalcode" m_ShipPostalCode = Value Case "shipregion" m_ShipRegion = Value Case "shipvia" m_ShipVia = Value Case "shippeddate" m_ShippedDate = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class OrderDetail Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'OrderDetail' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Order As Order Private m_Product As Product Private m_Discount As System.Single Private m_Quantity As System.Int16 Private m_UnitPrice As System.Decimal 'Public properties Public Overridable Property Order() As Order Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Order") Return m_Order End Get Set(ByVal Value As Order) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Order", Value) m_Order = Value End Set End Property Public Overridable Property Product() As Product Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Product") Return m_Product End Get Set(ByVal Value As Product) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Product", Value) m_Product = Value End Set End Property Public Overridable Property Discount() As System.Single Get Return m_Discount End Get Set(ByVal Value As System.Single) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Discount", Value) m_Discount = Value End Set End Property Public Overridable Property Quantity() As System.Int16 Get Return m_Quantity End Get Set(ByVal Value As System.Int16) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Quantity", Value) m_Quantity = Value End Set End Property Public Overridable Property UnitPrice() As System.Decimal Get Return m_UnitPrice End Get Set(ByVal Value As System.Decimal) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "UnitPrice", Value) m_UnitPrice = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "order" Return m_Order Case "product" Return m_Product Case "discount" Return m_Discount Case "quantity" Return m_Quantity Case "unitprice" Return m_UnitPrice Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "order" m_Order = Value Case "product" m_Product = Value Case "discount" m_Discount = Value Case "quantity" m_Quantity = Value Case "unitprice" m_UnitPrice = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Product Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Product' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_Category As Category Private m_Discontinued As System.Boolean Private m_OrderDetails As System.Collections.ArrayList = New System.Collections.ArrayList Private m_ProductName As System.String Private m_QuantityPerUnit As System.String Private m_ReorderLevel As System.Int16 Private m_Supplier As Supplier Private m_UnitPrice As System.Decimal Private m_UnitsInStock As System.Int16 Private m_UnitsOnOrder As System.Int16 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property Category() As Category Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Category") Return m_Category End Get Set(ByVal Value As Category) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Category", Value) m_Category = Value End Set End Property Public Overridable Property Discontinued() As System.Boolean Get Return m_Discontinued End Get Set(ByVal Value As System.Boolean) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Discontinued", Value) m_Discontinued = Value End Set End Property Public Overridable Property OrderDetails() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "OrderDetails") Return m_OrderDetails End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "OrderDetails", Value) m_OrderDetails = Value End Set End Property Public Overridable Property ProductName() As System.String Get Return m_ProductName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ProductName", Value) m_ProductName = Value End Set End Property Public Overridable Property QuantityPerUnit() As System.String Get Return m_QuantityPerUnit End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "QuantityPerUnit", Value) m_QuantityPerUnit = Value End Set End Property Public Overridable Property ReorderLevel() As System.Int16 Get Return m_ReorderLevel End Get Set(ByVal Value As System.Int16) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ReorderLevel", Value) m_ReorderLevel = Value End Set End Property Public Overridable Property Supplier() As Supplier Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Supplier") Return m_Supplier End Get Set(ByVal Value As Supplier) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Supplier", Value) m_Supplier = Value End Set End Property Public Overridable Property UnitPrice() As System.Decimal Get Return m_UnitPrice End Get Set(ByVal Value As System.Decimal) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "UnitPrice", Value) m_UnitPrice = Value End Set End Property Public Overridable Property UnitsInStock() As System.Int16 Get Return m_UnitsInStock End Get Set(ByVal Value As System.Int16) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "UnitsInStock", Value) m_UnitsInStock = Value End Set End Property Public Overridable Property UnitsOnOrder() As System.Int16 Get Return m_UnitsOnOrder End Get Set(ByVal Value As System.Int16) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "UnitsOnOrder", Value) m_UnitsOnOrder = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "category" Return m_Category Case "discontinued" Return m_Discontinued Case "orderdetails" Return m_OrderDetails Case "productname" Return m_ProductName Case "quantityperunit" Return m_QuantityPerUnit Case "reorderlevel" Return m_ReorderLevel Case "supplier" Return m_Supplier Case "unitprice" Return m_UnitPrice Case "unitsinstock" Return m_UnitsInStock Case "unitsonorder" Return m_UnitsOnOrder Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = value Case "category" m_Category = value Case "discontinued" m_Discontinued = value Case "orderdetails" m_OrderDetails = value Case "productname" m_ProductName = value Case "quantityperunit" m_QuantityPerUnit = value Case "reorderlevel" m_ReorderLevel = value Case "supplier" m_Supplier = value Case "unitprice" m_UnitPrice = value Case "unitsinstock" m_UnitsInStock = value Case "unitsonorder" m_UnitsOnOrder = value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Region Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Region' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_RegionDescription As System.String Private m_Territories As System.Collections.ArrayList = New System.Collections.ArrayList 'Public properties Public Overridable Property Id() As System.Int32 Get Return m_Id End Get Set(ByVal Value As System.Int32) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Id", Value) m_Id = Value End Set End Property Public Overridable Property RegionDescription() As System.String Get Return m_RegionDescription End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "RegionDescription", Value) m_RegionDescription = Value End Set End Property Public Overridable Property Territories() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Territories") Return m_Territories End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Territories", Value) m_Territories = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "regiondescription" Return m_RegionDescription Case "territories" Return m_Territories Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "regiondescription" m_RegionDescription = Value Case "territories" m_Territories = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Shipper Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Shipper' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_CompanyName As System.String Private m_Orders As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Phone As System.String 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property CompanyName() As System.String Get Return m_CompanyName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CompanyName", Value) m_CompanyName = Value End Set End Property Public Overridable Property Orders() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Orders") Return m_Orders End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Orders", Value) m_Orders = Value End Set End Property Public Overridable Property Phone() As System.String Get Return m_Phone End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Phone", Value) m_Phone = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "companyname" Return m_CompanyName Case "orders" Return m_Orders Case "phone" Return m_Phone Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "companyname" m_CompanyName = Value Case "orders" m_Orders = Value Case "phone" m_Phone = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class Public Class Supplier Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Supplier' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.Int32 Private m_Address As System.String Private m_City As System.String Private m_CompanyName As System.String Private m_ContactName As System.String Private m_ContactTitle As System.String Private m_Country As System.String Private m_Fax As System.String Private m_HomePage As System.String Private m_Phone As System.String Private m_PostalCode As System.String Private m_Products As System.Collections.ArrayList = New System.Collections.ArrayList Private m_Region As System.String 'Public properties Public Overridable ReadOnly Property Id() As System.Int32 Get Return m_Id End Get End Property Public Overridable Property Address() As System.String Get Return m_Address End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Address", Value) m_Address = Value End Set End Property Public Overridable Property City() As System.String Get Return m_City End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "City", Value) m_City = Value End Set End Property Public Overridable Property CompanyName() As System.String Get Return m_CompanyName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "CompanyName", Value) m_CompanyName = Value End Set End Property Public Overridable Property ContactName() As System.String Get Return m_ContactName End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ContactName", Value) m_ContactName = Value End Set End Property Public Overridable Property ContactTitle() As System.String Get Return m_ContactTitle End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "ContactTitle", Value) m_ContactTitle = Value End Set End Property Public Overridable Property Country() As System.String Get Return m_Country End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Country", Value) m_Country = Value End Set End Property Public Overridable Property Fax() As System.String Get Return m_Fax End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Fax", Value) m_Fax = Value End Set End Property Public Overridable Property HomePage() As System.String Get Return m_HomePage End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "HomePage", Value) m_HomePage = Value End Set End Property Public Overridable Property Phone() As System.String Get Return m_Phone End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Phone", Value) m_Phone = Value End Set End Property Public Overridable Property PostalCode() As System.String Get Return m_PostalCode End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "PostalCode", Value) m_PostalCode = Value End Set End Property Public Overridable Property Products() As System.Collections.ArrayList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Products") Return m_Products End Get Set(ByVal Value As System.Collections.ArrayList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Products", Value) m_Products = Value End Set End Property Public Overridable Property Region() As System.String Get Return m_Region End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Region", Value) m_Region = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "address" Return m_Address Case "city" Return m_City Case "companyname" Return m_CompanyName Case "contactname" Return m_ContactName Case "contacttitle" Return m_ContactTitle Case "country" Return m_Country Case "fax" Return m_Fax Case "homepage" Return m_HomePage Case "phone" Return m_Phone Case "postalcode" Return m_PostalCode Case "products" Return m_Products Case "region" Return m_Region Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "address" m_Address = Value Case "city" m_City = Value Case "companyname" m_CompanyName = Value Case "contactname" m_ContactName = Value Case "contacttitle" m_ContactTitle = Value Case "country" m_Country = Value Case "fax" m_Fax = Value Case "homepage" m_HomePage = Value Case "phone" m_Phone = Value Case "postalcode" m_PostalCode = Value Case "products" m_Products = Value Case "region" m_Region = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub Public Class Territory Implements _ MatsSoft.NPersist.Framework.IContextHolder, _ MatsSoft.NPersist.Framework.IObjectHelper #Region " MatsSoft maintained code : Generated Code For Class 'Territory' " 'Private field variables 'Holds reference to context manager. Required for implementation of IContextHolder Private m_ContextManager As MatsSoft.NPersist.Framework.IContextManager = Nothing 'Holds property values Private m_Id As System.String Private m_Employees As MatsSoft.NPersist.Framework.ManagedList = New MatsSoft.NPersist.Framework.ManagedList(Me, "Employees") Private m_Region As Region Private m_TerritoryDescription As System.String 'Public properties Public Overridable Property Id() As System.String Get Return m_Id End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Id", Value) m_Id = Value End Set End Property Public Overridable Property Employees() As MatsSoft.NPersist.Framework.ManagedList Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Employees") Return m_Employees End Get Set(ByVal Value As MatsSoft.NPersist.Framework.ManagedList) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Employees", Value) m_Employees = Value End Set End Property Public Overridable Property Region() As Region Get Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertyGet(Me, "Region") Return m_Region End Get Set(ByVal Value As Region) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "Region", Value) m_Region = Value End Set End Property Public Overridable Property TerritoryDescription() As System.String Get Return m_TerritoryDescription End Get Set(ByVal Value As System.String) Dim ctxMngr As MatsSoft.NPersist.Framework.IContextManager = CType(Me, MatsSoft.NPersist.Framework.IContextHolder).GetContextManager If Not ctxMngr Is Nothing Then ctxMngr.NotifyPropertySet(Me, "TerritoryDescription", Value) m_TerritoryDescription = Value End Set End Property 'Interface implementations 'IContextHolder interface implementation Private Function IContextHolder_GetContextManager() As MatsSoft.NPersist.Framework.IContextManager Implements MatsSoft.NPersist.Framework.IContextHolder.GetContextManager Return m_ContextManager End Function Private Sub IContextHolder_SetContextManager(ByVal value As MatsSoft.NPersist.Framework.IContextManager) Implements MatsSoft.NPersist.Framework.IContextHolder.SetContextManager m_ContextManager = value End Sub 'IObjectHelper interface implementation Protected Overridable Function IObjectHelper_GetPropertyValue(ByVal propertyName As String) As Object Implements MatsSoft.NPersist.Framework.IObjectHelper.GetPropertyValue Select Case LCase(propertyName) Case "id" Return m_Id Case "employees" Return m_Employees Case "region" Return m_Region Case "territorydescription" Return m_TerritoryDescription Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Function Protected Overridable Sub IObjectHelper_SetPropertyValue(ByVal propertyName As String, ByVal value As Object) Implements MatsSoft.NPersist.Framework.IObjectHelper.SetPropertyValue Select Case LCase(propertyName) Case "id" m_Id = Value Case "employees" m_Employees = Value Case "region" m_Region = Value Case "territorydescription" m_TerritoryDescription = Value Case Else Throw New Exception("IObjectHelper Error: Property with name '" & propertyName & "' not found!") End Select End Sub End Class