ITableMappingCollection ITableMappingCollection ITableMappingCollection ITableMappingCollection Interface

Definition

Contains a collection of TableMapping objects, and is implemented by the DataTableMappingCollection, which is used in common by .NET Framework data providers.

public interface class ITableMappingCollection : System::Collections::IList
public interface ITableMappingCollection : System.Collections.IList
type ITableMappingCollection = interface
    interface IList
    interface ICollection
    interface IEnumerable
Public Interface ITableMappingCollection
Implements IList
Derived
Implements

Examples

The following example creates an instance of the derived class, DataTableMapping, and adds it to a DataTableMappingCollection collection. It then informs the user that the mapping was added to the collection.

public void AddDataTableMapping() 
{
    // ...
    // create tableMappings
    // ...
    DataTableMapping mapping =
        new DataTableMapping("Categories","DataCategories");
    tableMappings.Add((Object) mapping);
    Console.WriteLine("Table {0} added to {1} table mapping collection.",
        mapping.ToString(), tableMappings.ToString());
}
Public Sub AddDataTableMapping()
    ' ...
    ' create tableMappings
    ' ...
    Dim mapping As New DataTableMapping( _
       "Categories", "DataCategories")
    tableMappings.Add(CType(mapping, Object))
    Console.WriteLine( _
       "Table {0} added to {1} table mapping collection.", _
       mapping.ToString(), tableMappings.ToString())
End Sub

Remarks

The ITableMappingCollection interface allows an inheriting class to implement a TableMapping collection. For more information, see DataAdapter DataTable and DataColumn Mappings.

An application does not create an instance of the ITableMappingCollection interface directly, but creates an instance of a class that inherits ITableMappingCollection.

Classes that inherit ITableMappingCollection must implement the inherited members, and typically define additional members to add provider-specific functionality. For example, the ITableMappingCollection interface defines one implementation of the RemoveAt method. In turn, the DataTableMappingCollection class inherits this method, and defines two additional overloads of RemoveAt.

Notes to Implementers

When you inherit from the ITableMappingCollection interface, you should implement the following constructor:

Item Description
PrvTableMappingCollection() Creates an empty PrvTableMappingCollection class.

Properties

Item[String] Item[String] Item[String] Item[String]

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

Methods

Add(String, String) Add(String, String) Add(String, String) Add(String, String)

Adds a table mapping to the collection.

Contains(String) Contains(String) Contains(String) Contains(String)

Gets a value indicating whether the collection contains a table mapping with the specified source table name.

GetByDataSetTable(String) GetByDataSetTable(String) GetByDataSetTable(String) GetByDataSetTable(String)

Gets the TableMapping object with the specified DataSet table name.

IndexOf(String) IndexOf(String) IndexOf(String) IndexOf(String)

Gets the location of the ITableMapping object within the collection.

RemoveAt(String) RemoveAt(String) RemoveAt(String) RemoveAt(String)

Removes the ITableMapping object with the specified SourceTable name from the collection.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to