Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

MetaModel.RegisterContext Method (DataModelProvider, ContextConfiguration)

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.

ExceptionCondition
ArgumentNullException

dataModelProvider or configuration is null.

InvalidOperationException

contextType is already registered.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1
Show:
© 2015 Microsoft