Hi Otis,
I'm not trying to be difficult. I love this product. But, I did do what you asked in regard to adding EntityCollection(of MyStaffHoursEntity) as a ServiceKnownType. But, as I wrote above, after I update the service in the client I get design-time compilation errors in the generated reference.vb file and in Service12.xsd file and Service13.xsd file.
Here is a typical place where there occurs an error in the reference.vb file (only when having EntityCollection(of MyStaffHoursEntity) as a ServiceKnownType):
<System.Xml.Serialization.XmlElementAttribute([Namespace]:="http://www.w3.org/2001/XMLSchema", Order:=0)> _
Public Property schema() As schema
Get
Return Me.schemaField
End Get
Set
Me.schemaField = value
Me.RaisePropertyChanged("schema")
End Set
End Property
The bolded term above gets the error and the tooltip Type 'schema' is not defined.
Here is a copy of the Service12.xsd file that gets generated.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/StaffHoursAdapter.HelperClasses" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/StaffHoursAdapter.HelperClasses" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="EntityCollectionOfMyStaffHoursEntityxKGLtsp9">
<xs:sequence>
<**xs:element ref="xs:schema" />
<xs:any />
</xs:sequence>
</xs:complexType>
<xs:element name="EntityCollectionOfMyStaffHoursEntityxKGLtsp9" nillable="true" type="tns:EntityCollectionOfMyStaffHoursEntityxKGLtsp9" />
<xs:complexType name="EntityCollection">
<xs:sequence>
<xs:element **ref="xs:schema" />
<xs:any />
</xs:sequence>
</xs:complexType>
<xs:element name="EntityCollection" nillable="true" type="tns:EntityCollection" />
</xs:schema>
The design-time compiler doesn't like where I've bolded it.
The tooltip for the error at **xs:element **states:
The 'http://www.w3.org/2001/XMLSchema:schema' element is not allowed
(I don't know where the "xKGLtsp9" part of the element name comes from, but it's there.)
Here is the entire service interface. Perhaps you can see something else that may be wrong (The first 3 function don't use Linq, and worked okay before I added EntityCollection(of myStaffHoursEntity) as a ServiceKnownType):
Imports System
Imports System.Xml
Imports SD.LLBLGen.Pro.ORMSupportClasses
Imports StaffHoursAdapter.EntityClasses
Imports StaffHoursAdapter.HelperClasses
Imports StaffHoursAdapter
Imports System.ServiceModel
<ServiceKnownType(GetType(StaffHoursEntity)), _
ServiceKnownType(GetType(LocationsEntity)), _
ServiceKnownType(GetType(StaffEntity)), _
ServiceKnownType(GetType(EntityCollection)), _
ServiceKnownType(GetType(MyStaffHoursEntity)), _
ServiceKnownType(GetType(EntityCollection(Of MyStaffHoursEntity))), _
ServiceContract()> _
Public Interface IService1
<OperationContract()> _
Function GetStaff() As IEntityCollection2
<OperationContract()> _
Function GetStaffHoursByStaffID(ByVal staff_id As String) As IEntityCollection2
<OperationContract()> _
Function GetStaffIDUserGroup(ByVal user_id As String, ByVal pwd As String, ByRef staff_id As String, ByRef user_group As Integer) As Integer
<OperationContract()> _
Function GetStaffHoursByStaffID_Linq(ByVal staff_id As String) As IEntityCollection2
End Interface