-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
EntityDataSourceContextDisposingEventArgs.xml
72 lines (65 loc) · 4.26 KB
/
EntityDataSourceContextDisposingEventArgs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<Type Name="EntityDataSourceContextDisposingEventArgs" FullName="System.Web.UI.WebControls.EntityDataSourceContextDisposingEventArgs">
<TypeSignature Language="C#" Value="public class EntityDataSourceContextDisposingEventArgs : System.ComponentModel.CancelEventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit EntityDataSourceContextDisposingEventArgs extends System.ComponentModel.CancelEventArgs" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.WebControls.EntityDataSourceContextDisposingEventArgs" />
<TypeSignature Language="VB.NET" Value="Public Class EntityDataSourceContextDisposingEventArgs
Inherits CancelEventArgs" />
<TypeSignature Language="F#" Value="type EntityDataSourceContextDisposingEventArgs = class
 inherit CancelEventArgs" />
<TypeSignature Language="C++ CLI" Value="public ref class EntityDataSourceContextDisposingEventArgs : System::ComponentModel::CancelEventArgs" />
<AssemblyInfo>
<AssemblyName>System.Web.Entity</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.CancelEventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Provides data for the <see cref="E:System.Web.UI.WebControls.EntityDataSource.ContextDisposing" /> event.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Handle the <xref:System.Web.UI.WebControls.EntityDataSource.ContextDisposing> event, and set the <xref:System.ComponentModel.CancelEventArgs.Cancel%2A> property of the <xref:System.Web.UI.WebControls.EntityDataSourceContextDisposingEventArgs> object to `true`. This prevents the disposal of the <xref:System.Data.Objects.ObjectContext>. For more information, see [Object Context Life-Cycle Management (EntityDataSource)](https://msdn.microsoft.com/library/67bc2486-112c-47c3-b23f-0297f7ac2160).
## Examples
This example maintains the <xref:System.Data.Objects.ObjectContext> for future reference by handling the <xref:System.Web.UI.WebControls.EntityDataSource.ContextCreated> event.
```
protected void EntityDataSource2_ContextDisposing(object sender,
EntityDataSourceContextDisposingEventArgs e)
{
e.Cancel = true;
}
```
]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName="Context">
<MemberSignature Language="C#" Value="public System.Data.Objects.ObjectContext Context { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Data.Objects.ObjectContext Context" />
<MemberSignature Language="DocId" Value="P:System.Web.UI.WebControls.EntityDataSourceContextDisposingEventArgs.Context" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Context As ObjectContext" />
<MemberSignature Language="F#" Value="member this.Context : System.Data.Objects.ObjectContext" Usage="System.Web.UI.WebControls.EntityDataSourceContextDisposingEventArgs.Context" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Data::Objects::ObjectContext ^ Context { System::Data::Objects::ObjectContext ^ get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web.Entity</AssemblyName>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Data.Objects.ObjectContext</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the <see cref="T:System.Data.Objects.ObjectContext" /> used by the data source.</summary>
<value>The object context used by the data source.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>