ContextConfiguration Class

 
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.

Provides information for a data-context instance in order to allow customization.

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

System.Object
  System.Web.DynamicData.ContextConfiguration

Public Class ContextConfiguration

NameDescription
System_CAPS_pubmethodContextConfiguration()

Initializes a new instance of the ContextConfiguration class.

NameDescription
System_CAPS_pubpropertyMetadataProviderFactory

Gets or sets the metadata provider.

System_CAPS_pubpropertyScaffoldAllTables

Gets or sets a value that indicates whether scaffolding is enabled.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The ContextConfiguration class enables you to customize data access. For example, you can use this class to enable scaffolding for a Web application, or to define a custom metadata provider.

The following example shows how to use the ContextConfiguration class when you call the RegisterContext method in order to register a data context with scaffolding enabled.

Dim model As New MetaModel
model.RegisterContext(GetType(AdventureWorksLTDataContext), _
   New ContextConfiguration() With {.ScaffoldAllTables = True})

.NET Framework
Available since 3.5

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: