LinqDataSourceView.ValidateContextType(Type, Boolean) 方法

定義

檢查資料內容類別是否衍生自 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)

參數

contextType
Type

要驗證之資料內容類別的型別。

selecting
Boolean

指定當選取作業開始時是否已呼叫方法。

例外狀況

正在執行插入、更新或刪除作業,且資料內容類別未衍生自 DataContext

備註

屬性中指定的 ContextTypeName 類別必須衍生自 DataContext 類別,才能啟用自動插入、更新和刪除作業。

適用於