This topic has not yet been rated - Rate this topic

ITableMappingCollection Interface

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

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)
public interface ITableMappingCollection : IList, 
	ICollection, IEnumerable

The ITableMappingCollection type exposes the following members.

  Name Description
Public property Supported by the XNA Framework Count Gets the number of elements contained in the ICollection. (Inherited from ICollection.)
Public property Supported by the XNA Framework IsFixedSize Gets a value indicating whether the IList has a fixed size. (Inherited from IList.)
Public property Supported by the XNA Framework IsReadOnly Gets a value indicating whether the IList is read-only. (Inherited from IList.)
Public property Supported by the XNA Framework IsSynchronized Gets a value indicating whether access to the ICollection is synchronized (thread safe). (Inherited from ICollection.)
Public property Supported by the XNA Framework Item[Int32] Gets or sets the element at the specified index. (Inherited from IList.)
Public property Supported by the XNA Framework Item[String] Gets or sets the instance of ITableMapping with the specified SourceTable name.
Public property Supported by the XNA Framework SyncRoot Gets an object that can be used to synchronize access to the ICollection. (Inherited from ICollection.)
Top
  Name Description
Public method Supported by the XNA Framework Add(Object) Adds an item to the IList. (Inherited from IList.)
Public method Supported by the XNA Framework Add(String, String) Adds a table mapping to the collection.
Public method Supported by the XNA Framework Clear Removes all items from the IList. (Inherited from IList.)
Public method Supported by the XNA Framework Contains(Object) Determines whether the IList contains a specific value. (Inherited from IList.)
Public method Supported by the XNA Framework Contains(String) Gets a value indicating whether the collection contains a table mapping with the specified source table name.
Public method Supported by the XNA Framework CopyTo Copies the elements of the ICollection to an Array, starting at a particular Array index. (Inherited from ICollection.)
Public method Supported by the XNA Framework GetByDataSetTable Gets the TableMapping object with the specified DataSet table name.
Public method Supported by the XNA Framework GetEnumerator Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public method Supported by the XNA Framework IndexOf(Object) Determines the index of a specific item in the IList. (Inherited from IList.)
Public method Supported by the XNA Framework IndexOf(String) Gets the location of the ITableMapping object within the collection.
Public method Supported by the XNA Framework Insert Inserts an item to the IList at the specified index. (Inherited from IList.)
Public method Supported by the XNA Framework Remove Removes the first occurrence of a specific object from the IList. (Inherited from IList.)
Public method Supported by the XNA Framework RemoveAt(Int32) Removes the IList item at the specified index. (Inherited from IList.)
Public method Supported by the XNA Framework RemoveAt(String) Removes the ITableMapping object with the specified SourceTable name from the collection.
Top
  Name Description
Public Extension Method AsParallel Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Supported by the XNA Framework Cast<TResult> Casts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method Supported by the XNA Framework OfType<TResult> Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

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

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.

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


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ