Đang chuẩn bị liên kết để tải về tài liệu:
Controlling the Names Used in a Strongly Typed DataSet

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

[ Team LiB ] Recipe 2.18 Controlling the Names Used in a Strongly Typed DataSet Problem You want to assign your own names to the classes and properties for strongly typed DataSet classes. Solution Use annotations in the XML schema to control the names of classes and properties in strongly typed DataSet classes. The sample uses one XSD file: CategoriesDS_AnnotatedNa | Team LiB Recipe 2.18 Controlling the Names Used in a Strongly Typed DataSet Problem You want to assign your own names to the classes and properties for strongly typed DataSet classes. Solution Use annotations in the XML schema to control the names of classes and properties in strongly typed DataSet classes. The sample uses one XSD file CategoriesDSAnnotatedName.xsd The schema used to generate the strongly typed DataSet. The schema is annotated so that you can access the collection of rows in the table by using the Categorys property of the DataSet rather than categories each row by using the Category property of the row collection rather than CategoriesRow and the CategoryName field by using the Name property of the row rather than CategoryName. The annotations are marked in bold in the Example 2-23. Example 2-23. File TypedDataSets CategoriesDS_AnnotatedName.xsd xml version 1.0 standalone yes xs schema id CategoriesDS_AnnotatedName targetNamespace http www.tempuri.org CategoriesDS_AnnotatedName.xsd xmlns mstns http www.tempuri.org CategoriesDS_AnnotatedName.xsd xmlns http www.tempuri.org CategoriesDS_AnnotatedName.xsd xmlns xs http www.w3.org 2001 XMLSchema xmlns msdata urn schemas-microsoft-com xml-msdata xmlns codegen urn schemas-microsoft-com xml-msprop attributeFormDefault qualified elementFormDefault qualified xs element name CategoriesDS_AnnotatedName msdata IsDataSet true xs complexType xs choice maxOccurs unbounded xs element name Categories codegen typedName Category codegen typedPlural Categorys xs complexType xs sequence xs element name CategoryID msdata ReadOnly true msdata AutoIncrement true type xs int xs element name CategoryName type xs string codegen typedName Name xs element name Description type xs string minOccurs 0 xs sequence xs complexType xs element xs choice xs complexType xs unique name Constraint1 msdata PrimaryKey true xs selector xpath . mstns Categories xs field xpath mstns CategoryID xs unique xs element xs schema The sample code .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.