A Table Data Gateway for a table or view. Provides methods to get, insert, update, and delete data in the table. This class is abstract.
Do not change this file manually. Modify the <TableCodeName>Collection class if you need to add or change some functionality.
C#: |
Initializes a new instance of the <TableCodeName>Collection_Base class.
db
The object.
C#: |
Gets the database object that this table belongs to.
C#: |
Adds a new parameter to the specified command.
cmd
The object to add the parameter to.paramName
The name of the parameter.value
The value of the parameter.
A reference to the added parameter.
C#: |
Creates a System.Data.DataTable object.
None
A reference to the System.Data.DataTable object.
C#: |
Creates an System.Data.IDbCommand object that can be used to delete records using a foreign key value.
foreignKeyColumnName
The foreign key value.foreignKeyColumnNameNull
true if the method ignores the <foreignKeyColumnName> parameter value and uses DbNull instead of it; otherwise, false.
A reference to the System.Data.IDbCommand object.
C#: |
Creates an System.Data.IDbCommand object that can be used to delete records that match the specified criteria.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".
A reference to the System.Data.IDbCommand object.
C#: |
Creates and returns an System.Data.IDbCommand object that is used to retrieve all records from the table.
None
A reference to the System.Data.IDbCommand object.
C#: |
Creates an System.Data.IDbCommand object that can be used to return records by a foreign key.
foreignKeyColumnName
The foreign key value.foreignKeyColumnNameNull
true if the method ignores the <foreignKeyColumnName> parameter value and uses DbNull instead of it; otherwise, false.
A reference to the System.Data.IDbCommand object.
C#: |
Creates an System.Data.IDbCommand object for the specified search criteria.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".orderBySql
The column name(s) followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted in ascending order by default. For example: "LastName ASC, FirstName ASC".
A reference to the System.Data.IDbCommand object.
C#: |
Deletes the specified object from the table.
value
The object to delete.
true if the record was deleted; otherwise, false.
C#: |
Deletes records that match the specified criteria.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".
The number of deleted records.
C#: |
Deletes all records from the table.
None
The number of deleted records.
C#: |
Deletes records from the table using a foreign key.
foreignKeyColumnName
The foreign key value.
The number of records deleted from the table.
C#: |
Deletes records from the table using a foreign key.
foreignKeyColumnName
The foreign key value.foreignKeyColumnNameNull
true if the method ignores the <foreignKeyColumnName> parameter value and uses DbNull instead of it; otherwise, false.
The number of records deleted from the table.
C#: |
Deletes a record from the table using the specified primary key value.
primaryKeyColumnName
The primary key value.
true if the record was deleted; otherwise, false.
C#: |
Gets an array of all records from the table.
None
An array of <TableCodeName>Row objects.
C#: |
Gets a System.Data.DataTable object that includes all records from the table.
None
A reference to the System.Data.DataTable object.
C#: |
Gets an array of <TableCodeName>Row objects that match the search condition, in the the specified sort order.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".orderBySql
The column name(s) followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted in ascending order by default. For example: "LastName ASC, FirstName ASC".
An array of <TableCodeName>Row objects.
C#: |
Gets an array of <TableCodeName>Row objects that match the search condition, in the the specified sort order.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".orderBySql
The column name(s) followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted in ascending order by default. For example: "LastName ASC, FirstName ASC".startIndex
The index of the first record to return.length
The number of records to return.totalRecordCount
A reference parameter that returns the total number of records in the reader object if 0 was passed into the method; otherwise it returns -1.
An array of <TableCodeName>Row objects.
C#: |
Gets a System.Data.DataTable object filled with data that match the search condition, in the the specified sort order.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".orderBySql
The column name(s) followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted in ascending order by default. For example: "LastName ASC, FirstName ASC".
A reference to the System.Data.DataTable object.
C#: |
Gets a System.Data.DataTable object filled with data that match the search condition, in the the specified sort order.
whereSql
The SQL search condition. For example: "FirstName='Smith' AND Zip=75038".orderBySql
The column name(s) followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted in ascending order by default. For example: "LastName ASC, FirstName ASC".startIndex
The index of the first record to return.length
The number of records to return.totalRecordCount
A reference parameter that returns the total number of records in the reader object if 0 was passed into the method; otherwise it returns -1.
A reference to the System.Data.DataTable object.
C#: |
Gets an array of <TableCodeName>Row objects by a foreign key.
foreignKeyColumnName
The foreign key value.
An array of <TableCodeName>Row objects.
C#: |
Gets an array of <TableCodeName>Row objects by a foreign key.
foreignKeyColumnName
The foreign key value.foreignKeyColumnNameNull
true if the method ignores the <foreignKeyColumnName> parameter value and uses DbNull instead of it; otherwise, false.
An array of <TableCodeName>Row objects.
C#: |
Gets a System.Data.DataTable object by a foreign key.
foreignKeyColumnName
The foreign key value.
A reference to the System.Data.DataTable object.
C#: |
Gets a System.Data.DataTable object by a foreign key.
foreignKeyColumnName
The foreign key value.foreignKeyColumnNameNull
true if the method ignores the <foreignKeyColumnName> parameter value and uses DbNull instead of it; otherwise, false.
A reference to the System.Data.DataTable object.
C#: |
Gets <TableCodeName>Row by the primary key.
primaryKeyColumnName
The primary key value.
An instance of <TableCodeName>Row or null reference (Nothing in Visual Basic) if the object was not found.
C#: |
Adds a new record into the table.
value
The object to be inserted.
C#: |
Reads data from the provided data reader and returns an array of mapped objects.
reader
The object to read data from the table.
An array of <TableCodeName>Row objects.
C#: |
Reads data from the provided data reader and returns an array of mapped objects.
reader
The object to read data from the table.startIndex
The index of the first record to map.length
The number of records to map.totalRecordCount
A reference parameter that returns the total number of records in the reader object if 0 was passed into the method; otherwise it returns -1.
An array of <TableCodeName>Row objects.
C#: |
Reads data from the provided data reader and returns a filled System.Data.DataTable object.
reader
The object to read data from the table.
A reference to the System.Data.DataTable object.
C#: |
Reads data from the provided data reader and returns a filled System.Data.DataTable object.
reader
The object to read data from the table.startIndex
The index of the first record to read.length
The number of records to read.totalRecordCount
A reference parameter that returns the total number of records in the reader object if 0 was passed into the method; otherwise it returns -1.
A reference to the System.Data.DataTable object.
C#: |
Converts System.Data.DataRow to <TableCodeName>Row.
row
The object to be mapped.
A reference to the <TableCodeName>Row object.
C#: |
Updates a record in the table.
value
The object used to update the table record.
true if the record was updated; otherwise, false.
C#: |
Updates the table.
table
The used to update the data source.