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)

適用対象