LinqDataSourceDisposeEventArgs.ObjectInstance 属性
定义
获取要释放的数据上下文对象。Gets the data context object to dispose.
public:
property System::Object ^ ObjectInstance { System::Object ^ get(); };
public object ObjectInstance { get; }
member this.ObjectInstance : obj
Public ReadOnly Property ObjectInstance As Object
属性值
表示数据上下文的对象。An object that represents the data context.
注解
ObjectInstance属性包含 LinqDataSource 控件用于数据操作的数据上下文对象。The ObjectInstance property contains the data context object that the LinqDataSource control uses for data operations. ObjectInstance如果要在对象被释放之前对其进行检查,则可以使用属性来检索数据上下文对象。You can use the ObjectInstance property to retrieve the data context object if you want to examine the object before it is disposed.
当 LinqDataSource 控件与数据库交互时,属性将 ObjectInstance 设置为 DataContext 表示数据库的对象。When the LinqDataSource control interacts with a database, the ObjectInstance property is set to the DataContext object that represents the database. 当 LinqDataSource 控件与内存中数据集合交互时, ObjectInstance 属性将设置为包含数据集合的对象。When the LinqDataSource control interacts with an in-memory data collection, the ObjectInstance property is set to the object that contains the data collection.