MetaModel.RegisterContext Method (Type, ContextConfiguration)


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

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


Type: System.Type

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

Type: System.Web.DynamicData.ContextConfiguration

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

Exception Condition

contextType is null.

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
Available since 3.5
Return to top