The current XSD is :
<xs:element name="Country">
<xs:complexType>
<xs:sequence>
<xs:element name="code" type="xs:string" />
<xs:element name="name" type="xs:string" />
<xs:element name="diallingcode" type="xs:int" />
<xs:element name="displayOrder" type="xs:nonNegativeInteger" />
</xs:sequence>
</xs:complexType>
<xs:key name="countryKey1">
<xs:selector xpath="." />
<xs:field xpath="mstns:code" />
</xs:key>
</xs:element>
And the generated class is:
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class CountryDataTable : global::System.Data.TypedTableBase<CountryRow> {
As soon as I modified the XSD, adding a new field. The generated class changes to:
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class CountryDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
This last code breaks some Linq queries that are using the dataset.
Does anyone know what the problem could be?