DataTableMappingCollection Class

DataTableMappingCollection Class

 

A collection of DataTableMapping objects. This class cannot be inherited.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.MarshalByRefObject
    System.Data.Common.DataTableMappingCollection

[ListBindableAttribute(false)]
public sealed class DataTableMappingCollection : MarshalByRefObject, 
	ITableMappingCollection, IList, ICollection, IEnumerable

NameDescription
System_CAPS_pubmethodDataTableMappingCollection()

Initializes a new instance of the DataTableMappingCollection class. This new instance is empty, that is, it does not yet contain any DataTableMapping objects.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of DataTableMapping objects in the collection.

System_CAPS_pubpropertyItem[Int32]

Gets or sets the DataTableMapping object at the specified index.

System_CAPS_pubpropertyItem[String]

Gets or sets the DataTableMapping object with the specified source table name.

NameDescription
System_CAPS_pubmethodAdd(Object)

Adds an Object that is a table mapping to the collection.

System_CAPS_pubmethodAdd(String, String)

Adds a DataTableMapping object to the collection when given a source table name and a DataSet table name.

System_CAPS_pubmethodAddRange(Array)

Copies the elements of the specified Array to the end of the collection.

System_CAPS_pubmethodAddRange(DataTableMapping[])

Copies the elements of the specified DataTableMapping array to the end of the collection.

System_CAPS_pubmethodClear()

Removes all DataTableMapping objects from the collection.

System_CAPS_pubmethodContains(Object)

Gets a value indicating whether the given DataTableMapping object exists in the collection.

System_CAPS_pubmethodContains(String)

Gets a value indicating whether a DataTableMapping object with the specified source table name exists in the collection.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the elements of the DataTableMappingCollection to the specified array.

System_CAPS_pubmethodCopyTo(DataTableMapping[], Int32)

Copies the elements of the DataTableMapping to the specified array.

System_CAPS_pubmethodCreateObjRef(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.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetByDataSetTable(String)

Gets the DataTableMapping object with the specified DataSet table name.

System_CAPS_pubmethodGetEnumerator()

Gets an enumerator that can iterate through the collection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodSystem_CAPS_staticGetTableMappingBySchemaAction(DataTableMappingCollection, String, String, MissingMappingAction)

Gets a DataColumnMapping object with the specified source table name and DataSet table name, using the given MissingMappingAction.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(Object)

Gets the location of the specified DataTableMapping object within the collection.

System_CAPS_pubmethodIndexOf(String)

Gets the location of the DataTableMapping object with the specified source table name.

System_CAPS_pubmethodIndexOfDataSetTable(String)

Gets the location of the DataTableMapping object with the specified DataSet table name.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodInsert(Int32, DataTableMapping)

Inserts a DataTableMapping object into the DataTableMappingCollection at the specified index.

System_CAPS_pubmethodInsert(Int32, Object)

Inserts a DataTableMapping object into the DataTableMappingCollection at the specified index.

System_CAPS_pubmethodRemove(DataTableMapping)

Removes the specified DataTableMapping object from the collection.

System_CAPS_pubmethodRemove(Object)

Removes the specified DataTableMapping object from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the DataTableMapping object located at the specified index from the collection.

System_CAPS_pubmethodRemoveAt(String)

Removes the DataTableMapping object with the specified source table name from the collection.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodITableMappingCollection.Add(String, String)

Adds a table mapping to the collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodITableMappingCollection.GetByDataSetTable(String)

Gets the TableMapping object with the specified DataSet table name.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value indicating whether access to the ICollection is synchronized (thread safe).

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsFixedSize

Gets a value indicating whether the IList has a fixed size.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsReadOnly

Gets a value indicating whether the IList is read-only.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.Item[Int32]

Gets or sets an item from the collection at a specified index.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITableMappingCollection.Item[String]

Gets or sets the instance of ITableMapping with the specified SourceTable name.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<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 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);
}

.NET Framework
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.

Return to top
Show:
© 2016 Microsoft