LinqDataSourceView.ValidateContextType(Type, Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈