codegen Namespace
The codegen namespace gives you fine-grained
control of a typed DataSet. By adding
codegen attributes, you can configure the names
that are used for methods, properties, relations, and constraints.
When using the codegen namespace, it should be
imported as shown:
<xs:schema id="DataSetName" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:codegen="urn:schemas-microsoft-com:xml-msprop" >Warning
codegen attributes configure the names used in
strongly typed DataSet
objects. They do not have any effect on
the functionality of the generated DataSet class.
Table B-1 indicates where the various
codegen attributes can be used and what they
accomplish. Table B-2 briefly describes each
attribute.
|
Typed DataSet object/method/event |
Default name |
codegen attribute |
DataTable |
TableNameDataTable |
typedPlural |
DataTable Methods |
NewTableNameRow AddTableNameRow DeleteTableNameRow |
typedName |
DataRowCollection |
TableName |
typedPlural |
DataRow |
TableNameRow |
typedName |
DataColumn |
DataTable.ColumnNameColumn DataRow.ColumnName |
typedName |
Property |
PropertyName |
typedName |
Child Accessor |
GetChildTableNameRows |
typedChildren |
Parent Accessor |
TableNameRow |
typedParent |
DataSet Events |
TableNameRowChangeEvent TableNameRowChangeEventHandler |
typedName |
|
Attribute |
Description |
typedName |
Name of the object in the generated class. |
typedPlural |
The name of the ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access