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
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk