Прочитај на енглеском Уреди

Делите путем


LinqDataSourceView.CreateContext Method

Definition

Creates an instance of the data context type.

Overloads

CreateContext(Type)

Creates an instance of the data context type.

CreateContext(DataSourceOperation)

Creates an instance of the data context type using the specified data source operation.

CreateContext(Type)

Creates an instance of the data context type.

C#
protected virtual object CreateContext(Type contextType);

Parameters

contextType
Type

The type of the data context to create.

Returns

An instance of the data context type.

Applies to

.NET Framework 4.8.1 и друге верзије
Производ Верзије
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreateContext(DataSourceOperation)

Creates an instance of the data context type using the specified data source operation.

C#
protected override System.Web.UI.WebControls.ContextDataSourceContextData CreateContext(System.Web.UI.DataSourceOperation operation);

Parameters

operation
DataSourceOperation

The data source operation to use.

Returns

An instance of the data context.

Applies to

.NET Framework 4.8.1 и друге верзије
Производ Верзије
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1