This documentation is archived and is not being maintained.

ContextConfiguration Class

Updated: July 2008

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)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class ContextConfiguration

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.

MetaModel model = new MetaModel();
    new ContextConfiguration() { ScaffoldAllTables = true });


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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5 SP1




July 2008

Added topic for new class.

SP1 feature change.