DataTableMappingCollection Class
A collection of DataTableMapping objects. This class cannot be inherited.
Namespace: System.Data.Common
Assembly: System.Data (in System.Data.dll)
The DataTableMappingCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | DataTableMappingCollection | Initializes a new instance of the DataTableMappingCollection class. This new instance is empty, that is, it does not yet contain any DataTableMapping objects. |
| Name | Description | |
|---|---|---|
![]() ![]() | Count | Gets the number of DataTableMapping objects in the collection. |
![]() ![]() | Item[Int32] | Gets or sets the DataTableMapping object at the specified index. |
![]() ![]() | Item[String] | Gets or sets the DataTableMapping object with the specified source table name. |
| Name | Description | |
|---|---|---|
![]() ![]() | Add(Object) | Adds an Object that is a table mapping to the collection. |
![]() ![]() | Add(String, String) | Adds a DataTableMapping object to the collection when given a source table name and a DataSet table name. |
![]() ![]() | AddRange(Array) | Copies the elements of the specified Array to the end of the collection. |
![]() ![]() | AddRange(DataTableMapping[]) | Copies the elements of the specified DataTableMapping array to the end of the collection. |
![]() ![]() | Clear | Removes all DataTableMapping objects from the collection. |
![]() ![]() | Contains(Object) | Gets a value indicating whether the given DataTableMapping object exists in the collection. |
![]() ![]() | Contains(String) | Gets a value indicating whether a DataTableMapping object with the specified source table name exists in the collection. |
![]() ![]() | CopyTo(Array, Int32) | Copies the elements of the DataTableMappingCollection to the specified array. |
![]() ![]() | CopyTo(DataTableMapping[], Int32) | Copies the elements of the DataTableMapping to the specified array. |
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() ![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() ![]() | GetByDataSetTable | Gets the DataTableMapping object with the specified DataSet table name. |
![]() ![]() | GetEnumerator | Gets an enumerator that can iterate through the collection. |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() ![]() ![]() | GetTableMappingBySchemaAction | Gets a DataColumnMapping object with the specified source table name and DataSet table name, using the given MissingMappingAction. |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | IndexOf(Object) | Gets the location of the specified DataTableMapping object within the collection. |
![]() ![]() | IndexOf(String) | Gets the location of the DataTableMapping object with the specified source table name. |
![]() ![]() | IndexOfDataSetTable | Gets the location of the DataTableMapping object with the specified DataSet table name. |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() ![]() | Insert(Int32, DataTableMapping) | Inserts a DataTableMapping object into the DataTableMappingCollection at the specified index. |
![]() ![]() | Insert(Int32, Object) | Inserts a DataTableMapping object into the DataTableMappingCollection at the specified index. |
![]() ![]() | Remove(DataTableMapping) | Removes the specified DataTableMapping object from the collection. |
![]() ![]() | Remove(Object) | Removes the specified DataTableMapping object from the collection. |
![]() ![]() | RemoveAt(Int32) | Removes the DataTableMapping object located at the specified index from the collection. |
![]() ![]() | RemoveAt(String) | Removes the DataTableMapping object with the specified source table name from the collection. |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel | Enables parallelization of a query. (Defined by ParallelEnumerable.) |
![]() | AsQueryable | Converts an IEnumerable to an IQueryable. (Defined by Queryable.) |
![]() ![]() | Cast<TResult> | Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.) |
![]() ![]() | OfType<TResult> | Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.) |
| Name | Description | |
|---|---|---|
![]() ![]() ![]() | ICollection.IsSynchronized | Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
![]() ![]() ![]() | ICollection.SyncRoot | Gets an object that can be used to synchronize access to the ICollection. |
![]() ![]() ![]() | IList.IsFixedSize | Gets a value indicating whether the IList has a fixed size. |
![]() ![]() ![]() | IList.IsReadOnly | Gets a value indicating whether the IList is read-only. |
![]() ![]() ![]() | IList.Item | Gets or sets an item from the collection at a specified index. |
![]() ![]() ![]() | ITableMappingCollection.Add | Adds a table mapping to the collection. |
![]() ![]() ![]() | ITableMappingCollection.GetByDataSetTable | Gets the TableMapping object with the specified DataSet table name. |
![]() ![]() ![]() | ITableMappingCollection.Item | Gets or sets the instance of ITableMapping with the specified SourceTable name. |
The following example uses an OleDbDataAdapter to Add DataTableMapping objects to its TableMappings collection, and then displays a list of those mapped source tables. This example assumes that an OleDbDataAdapter has already been created.
public void ShowTableMappings() { // ... // create adapter // ... adapter.TableMappings.Add("Categories","DataCategories"); adapter.TableMappings.Add("Orders","DataOrders"); adapter.TableMappings.Add("Products","DataProducts"); string message = "Table Mappings:\n"; for(int i=0;i < adapter.TableMappings.Count;i++) { message += i.ToString() + " " + adapter.TableMappings[i].ToString() + "\n"; } Console.WriteLine(message); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

