键入的DataSet架构 [英] Typed DataSet Schema

查看:68
本文介绍了键入的DataSet架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个类型化数据集..添加 - >新项目 - > DataSet1.xsd ..



我在数据表中添加了两列。



现在我的xsd架构如下所示。




<?xml version =" 1.0"编码= QUOT; UTF-8英寸?>

- < xs:schema id =" SampleDataSet"的targetNamespace = QUOT; HTTP://tempuri.org/SampleDataSet.xsd"的xmlns:mstns = QUOT; HTTP://tempuri.org/SampleDataSet.xsd"的xmlns = QUOT; HTTP://tempuri.org/SampleDataSet.xsd"的xmlns:XS = QUOT; HTTP://www.w3.org/2001/XMLSchema"的xmlns:MSDATA = QUOT;瓮:架构 - 微软-COM:XML-MSDATA"
xmlns:msprop =" urn:schemas-microsoft-com:xml-msprop" attributeFormDefault = QUOT;合格" elementFormDefault =" qualified">

- < xs:annotation>

- < xs:appinfo source =" urn:schemas-microsoft-com:xml -msdatasource">

- < DataSource DefaultConnectionIndex =" 0" FunctionsComponentName = QUOT; QueriesTableAdapter" Modifier =" AutoLayout,AnsiClass,Class,Public" SchemaSerializationMode = QUOT; IncludeSchema" xmlns =" urn:schemas-microsoft-com:xml-msdatasource">
$
< Connections />

< Tables />

<来源/>

< / DataSource>

< / xs:appinfo>

< / xs:annotation>

- < xs:element name =" SampleDataSet" MSDATA:IsDataSet = QUOT;真" MSDATA:UseCurrentLocale = QUOT;真" msprop:Generator_DataSetName = QUOT; SampleDataSet" msprop:Generator_UserDSName = QUOT; SampleDataSet" msprop:EnableTableAdapterManager =" true">

- < xs:complexType>

- < xs:choice minOccurs =" 0" maxOccurs =" unbounded">

- < xs:element name =" SampleDataTable" msprop:Generator_UserTableName = QUOT; SampleDataTable" msprop:Generator_RowDeletedName = QUOT; SampleDataTableRowDeleted" msprop:Generator_TableClassName = QUOT; SampleDataTableDataTable" msprop:Generator_RowChangedName = QUOT; SampleDataTableRowChanged"
msprop:Generator_RowClassName =" SampleDataTableRow" msprop:Generator_RowChangingName = QUOT; SampleDataTableRowChanging" msprop:Generator_RowEvArgName = QUOT; SampleDataTableRowChangeEvent" msprop:Generator_RowEvHandlerName = QUOT; SampleDataTableRowChangeEventHandler" msprop:Generator_TablePropName = QUOT; SampleDataTable"
msprop:Generator_TableVarName =" tableSampleDataTable" msprop:Generator_RowDeletingName =" SampleDataTableRowDeleting">

- < xs:complexType>

- < xs:sequence>

< xs:element name =" Column1" msprop:Generator_UserColumnName = QUOT; column1的" msprop:Generator_ColumnPropNameInRow = QUOT; column1的" msprop:Generator_ColumnVarNameInTable = QUOT; columnColumn1" msprop:Generator_ColumnPropNameInTable = QUOT; Column1Column"类型= QUOT; XS:串QUOT;的minOccurs = QUOT; 0"
/>

< xs:element name =" Column2" msprop:Generator_UserColumnName = QUOT;列2" msprop:Generator_ColumnPropNameInRow = QUOT;列2" msprop:Generator_ColumnVarNameInTable = QUOT; columnColumn2" msprop:Generator_ColumnPropNameInTable = QUOT; Column2Column"类型= QUOT; XS:串QUOT;的minOccurs = QUOT; 0"
/>

< / xs:sequence>

< / xs:complexType>

< / xs:element>

< / xs:choice>

< / xs:complexType>

< / xs:element>

< / xs:schema>
$


$
我在模式中看到一些额外的行和属性..如何避免这种情况......我是引用此链接.Dataset架构应该是这样的..

http://oreilly.com/pub/h/5157






< big>< / big>

解决方案

请在数据论坛中尝试此问题:
http ://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/threads
 


祝你有个美好的一天。


i have created a typed dataset.. Add-->New Item-->DataSet1.xsd..

And i have added two columns in the datatable.

Now my xsd schema is looking like below.


<?xml version="1.0" encoding="utf-8" ?>
- <xs:schema id="SampleDataSet" targetNamespace="http://tempuri.org/SampleDataSet.xsd" xmlns:mstns="http://tempuri.org/SampleDataSet.xsd" xmlns="http://tempuri.org/SampleDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
- <xs:annotation>
- <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
- <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
<Connections />
<Tables />
<Sources />
</DataSource>
</xs:appinfo>
</xs:annotation>
- <xs:element name="SampleDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_DataSetName="SampleDataSet" msprop:Generator_UserDSName="SampleDataSet" msprop:EnableTableAdapterManager="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="SampleDataTable" msprop:Generator_UserTableName="SampleDataTable" msprop:Generator_RowDeletedName="SampleDataTableRowDeleted" msprop:Generator_TableClassName="SampleDataTableDataTable" msprop:Generator_RowChangedName="SampleDataTableRowChanged" msprop:Generator_RowClassName="SampleDataTableRow" msprop:Generator_RowChangingName="SampleDataTableRowChanging" msprop:Generator_RowEvArgName="SampleDataTableRowChangeEvent" msprop:Generator_RowEvHandlerName="SampleDataTableRowChangeEventHandler" msprop:Generator_TablePropName="SampleDataTable" msprop:Generator_TableVarName="tableSampleDataTable" msprop:Generator_RowDeletingName="SampleDataTableRowDeleting">
- <xs:complexType>
- <xs:sequence>
<xs:element name="Column1" msprop:Generator_UserColumnName="Column1" msprop:Generator_ColumnPropNameInRow="Column1" msprop:Generator_ColumnVarNameInTable="columnColumn1" msprop:Generator_ColumnPropNameInTable="Column1Column" type="xs:string" minOccurs="0" />
<xs:element name="Column2" msprop:Generator_UserColumnName="Column2" msprop:Generator_ColumnPropNameInRow="Column2" msprop:Generator_ColumnVarNameInTable="columnColumn2" msprop:Generator_ColumnPropNameInTable="Column2Column" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>


I am seeing some extra rows and properties in my schema..How to avoid this..I am refering this link..Dataset schema should be like this..
http://oreilly.com/pub/h/5157


<big></big>

解决方案

Please try this issue in Data forum: http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/threads 

Have a nice day.


这篇关于键入的DataSet架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆