Επεξεργασία

Κοινή χρήση μέσω


ContextConfiguration Class

Definition

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

public ref class ContextConfiguration
public class ContextConfiguration
type ContextConfiguration = class
Public Class ContextConfiguration
Inheritance
ContextConfiguration

Examples

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();
model.RegisterContext(typeof(AdventureWorksLTDataContext), 
    new ContextConfiguration() { ScaffoldAllTables = true });
Dim model As New MetaModel
model.RegisterContext(GetType(AdventureWorksLTDataContext), _
   New ContextConfiguration() With {.ScaffoldAllTables = True})

Remarks

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.

Constructors

ContextConfiguration()

Initializes a new instance of the ContextConfiguration class.

Properties

MetadataProviderFactory

Gets or sets the metadata provider.

ScaffoldAllTables

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

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to