Adds missing members (columns) to a table.

Namespace:  Huagati.DBMLTools.Runtime
Assembly:  HuagatiDBMLToolsRTE (in HuagatiDBMLToolsRTE.dll) Version: 1.66.3362.23798

Syntax

C#
public static void AddMissingMembers(
	this MetaTable table,
	IDbConnection connection
)
Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Sub AddMissingMembers ( _
	table As MetaTable, _
	connection As IDbConnection _
)
Visual C++
[ExtensionAttribute]
public:
static void AddMissingMembers(
	MetaTable^ table, 
	IDbConnection^ connection
)

Parameters

table
Type: System.Data.Linq.Mapping..::.MetaTable
Linq-to-SQL MetaTable object for the table to add member columns to.
connection
Type: System.Data..::.IDbConnection
Database connection.

Examples

This example shows how to add missing members to all tables referenced by a Linq-to-SQL datacontext.
CopyC#
using Huagati.DBMLTools.Runtime;

public class MappingSample
{
    public void Test()
    {
        SomeDataContext dc = new SomeDataContext();

        //iterate through the collection of tables defined in the datacontext
        foreach (System.Data.Linq.Mapping.MetaTable table in dc.Mapping.GetTables())
        {
            //add missing members to the table
            table.AddMissingMembers(dc.Connection);
        }
    }
}

See Also