Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RegisterContext Method (Type, ContextConfiguration)

MetaModel.RegisterContext Method (Type, ContextConfiguration)

Registers a data-context instance by using the specified context configuration.

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

abstract RegisterContext : 
        contextType:Type * 
        configuration:ContextConfiguration -> unit  
override RegisterContext : 
        contextType:Type * 
        configuration:ContextConfiguration -> unit

Parameters

contextType
Type: System.Type

The type of the data context as defined in the data model.

configuration
Type: System.Web.DynamicData.ContextConfiguration

The configuration information for the context, as defined by the ContextConfiguration class.

ExceptionCondition
ArgumentNullException

contextType is a null reference (Nothing in Visual Basic).

The following example shows how to use the RegisterContext(Type, ContextConfiguration) method to register a data context with scaffolding enabled, as specified by the configuration parameter.

No code example is currently available or this language may not be supported.

.NET Framework

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