To create a method that will return an object that will be used to map data returned from the data base. All dataset operations require a DataTableMapping.
You have VisualStudio.NET open. You are creating the RegionHelper command class in the Data Access project. The code generated by the Data Adapter Wizard while it was generating the stored procedures for the Region table should be readily available.
You need a Data Table Mapping whenever want to use a data set and a data adapter. This provides a common, accurate map for the underlying object with little work. Furthermore, this method is not prone to the kinds of errors that are common to building data table mappings.
The first parameter in the ColumnMappings.Add method names the source column; the second is the name it will have in the returned dataset. As you can see, the same name is always used unless a source column name is duplicated.
All data table mapping methods should look very similar to this, varying only by the name of the table and the name and number of columns.
Note that this is similar to the rest of the methods in that it converts an object created by the wizard into a widely available object. It is different from the rest of the methods in that it requires more editing and transformation, and it uses slightly different syntax.
Previous Step: Create the RegionHelper Class
Next Step: Create the Select Command Method