EntityDataSourceContextCreatingEventArgs クラス

定義

ContextCreating イベントのデータを提供します。

public ref class EntityDataSourceContextCreatingEventArgs : EventArgs
public class EntityDataSourceContextCreatingEventArgs : EventArgs
type EntityDataSourceContextCreatingEventArgs = class
    inherit EventArgs
Public Class EntityDataSourceContextCreatingEventArgs
Inherits EventArgs
継承
EntityDataSourceContextCreatingEventArgs

次の例は、 オブジェクトの変数の ObjectContext 作成と、 オブジェクトの Page プロパティへの Context 代入を EntityDataSourceContextCreatingEventArgs 示しています。

public partial class _Default : System.Web.UI.Page  
    {  
        AdventureWorksModel.AdventureWorksEntities objCtx =  
            new AdventureWorksModel.AdventureWorksEntities();  

        protected void EntityDataSource2_ContextCreating(object sender,   
            EntityDataSourceContextCreatingEventArgs e)  
        {  
            e.Context = objCtx;  
        }  
    }  

注釈

EntityDataSourceContextCreatingEventArgsオブジェクトには、 イベントのContextハンドラーで実行ObjectContext時間の長い に割り当てることができる プロパティがありますContextCreating。 詳細については、「 オブジェクト コンテキスト Life-Cycle管理 (EntityDataSource)」を参照してください。

プロパティ

Context

データ ソースが使用する ObjectContext を取得します。

メソッド

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象