DataTableMappingCollection Class
A collection of DataTableMapping objects. This class cannot be inherited.
Assembly: System.Data (in System.Data.dll)
| 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(Type) | 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(String) | Gets the DataTableMapping object with the specified DataSet table name. |
![]() | GetEnumerator() | Gets an enumerator that can iterate through the collection. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() ![]() | GetTableMappingBySchemaAction(DataTableMappingCollection, String, String, MissingMappingAction) | Gets a DataColumnMapping object with the specified source table name and DataSet table name, using the given MissingMappingAction. |
![]() | GetType() | |
![]() | 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(String) | 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 | |
|---|---|---|
![]() ![]() | ITableMappingCollection.Add(String, String) | Adds a table mapping to the collection. |
![]() ![]() | ITableMappingCollection.GetByDataSetTable(String) | Gets the TableMapping object with the specified DataSet table name. |
![]() ![]() | 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(Int32) | Gets or sets an item from the collection at a specified index. |
![]() ![]() | ITableMappingCollection.Item(String) | Gets or sets the instance of ITableMapping with the specified SourceTable name. |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast(Of TResult)() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType(Of TResult)() | Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.) |
The following example uses an OleDbDataAdapter to AddDataTableMapping 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 Sub ShowTableMappings() ' ... ' create adapter ' ... adapter.TableMappings.Add("Categories", "DataCategories") adapter.TableMappings.Add("Orders", "DataOrders") adapter.TableMappings.Add("Products", "DataProducts") Dim message As String = "Table Mappings:" & ControlChars.Cr Dim i As Integer For i = 0 To adapter.TableMappings.Count - 1 message &= i.ToString() & " " _ & adapter.TableMappings(i).ToString() & ControlChars.Cr Next i Console.WriteLine(message) End Sub
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





