LinqDataSourceView.ValidateContextType(Type, Boolean) Method

Definition

Checks whether the data context class derives from DataContext.

protected:
 virtual void ValidateContextType(Type ^ contextType, bool selecting);
protected virtual void ValidateContextType (Type contextType, bool selecting);
abstract member ValidateContextType : Type * bool -> unit
override this.ValidateContextType : Type * bool -> unit
Protected Overridable Sub ValidateContextType (contextType As Type, selecting As Boolean)

Parameters

contextType
Type

The type of the data context class to validate.

selecting
Boolean

Specifies whether the method has been called when a select operation starts.

Exceptions

An insert, update, or delete operation is being performed and the data context class does not derive from DataContext.

Remarks

The class that is specified in the ContextTypeName property must derive from the DataContext class in order to enable automatic insert, update, and delete operations.

Applies to