LinqDataSourceView.ValidateContextType(Type, Boolean) Metod

Definition

Kontrollerar om datakontextklassen härleds från 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)

Parametrar

contextType
Type

Typen av datakontextklass som ska valideras.

selecting
Boolean

Anger om metoden har anropats när en select-åtgärd startas.

Undantag

En infognings-, uppdaterings- eller borttagningsåtgärd utförs och datakontextklassen härleds inte från DataContext.

Kommentarer

Klassen som anges i ContextTypeName egenskapen måste härledas från DataContext klassen för att aktivera automatiska infognings-, uppdaterings- och borttagningsåtgärder.

Gäller för