asp.net.ph

ITableMappingCollection Interface

System.Data Namespace


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

ITableMappingCollection Interface Members

Collapse   Properties

Visibility Name Value Type Accessibility
public Item ( String index ) Object [ Get , Set ]

Collapse   Methods

Visibility Name Parameters Return Type
public Add ( String sourceTableName , String dataSetTableName ) ITableMapping
public Contains ( String sourceTableName ) Boolean
public GetByDataSetTable ( String dataSetTableName ) ITableMapping
public IndexOf ( String sourceTableName ) Int32
public RemoveAt ( String sourceTableName ) Void

Classes that Implement ITableMappingCollection


Class Description
DataTableMappingCollection A collection of DataTableMapping objects. This class cannot be inherited.

Remarks

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

An application does not create an instance of the ITableMappingCollection interface directly, but initializes 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 ( ) Initializes an empty PrvTableMappingCollection class.

Example

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

void AddDataTableMapping ( ) {

   // ... create myTableMappings ...
   DataTableMapping myNewMapping = 
     new DataTableMapping ( "Categories","DataCategories" );
   myTableMappings.Add ( ( Object ) myNewMapping );
   Response.Write ( "Table " + myNewMapping.ToString ( ) + 
     " added to " + "table mapping collection " + 
     myTableMappings.ToString ( ) );
}
  C# VB

Skip Navigation Links



Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph