MetaModel.RegisterContext Method (DataModelProvider, ContextConfiguration)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Registers a data-context instance by using the specified context configuration and by enabling a data-model provider.

Namespace:   System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public virtual void RegisterContext(
	DataModelProvider dataModelProvider,
	ContextConfiguration configuration
)

Parameters

dataModelProvider
Type: System.Web.DynamicData.ModelProviders.DataModelProvider

A provider for the data model.

configuration
Type: System.Web.DynamicData.ContextConfiguration

The context information as defined by the ContextConfiguration class.

Exception Condition
ArgumentNullException

dataModelProvider or configuration is null.

InvalidOperationException

contextType is already registered.

.NET Framework
Available since 3.5
Return to top
Show: