다음을 통해 공유


EntityDataSource.Inserted 이벤트

정의

데이터 원본에서 새 개체를 만든 후에 발생합니다.

public:
 event EventHandler<System::Web::UI::WebControls::EntityDataSourceChangedEventArgs ^> ^ Inserted;
public event EventHandler<System.Web.UI.WebControls.EntityDataSourceChangedEventArgs> Inserted;
member this.Inserted : EventHandler<System.Web.UI.WebControls.EntityDataSourceChangedEventArgs> 
Public Custom Event Inserted As EventHandler(Of EntityDataSourceChangedEventArgs) 

이벤트 유형

설명

Inserted 이벤트는 추가된 개체가 데이터 원본에 만들어지거나 개체 데이터가 데이터 원본에 유지될 때 오류가 발생한 경우에 발생합니다. Entity 개체의 EntityDataSourceChangedEventArgs 속성은 추가된 개체에 액세스하는 데 사용됩니다.

이 개체의 속성에는 데이터 원본에서 생성된 값을 포함하여 데이터 원본에서 반환되는 값이 포함됩니다.

개체가 데이터 원본 Inserted 에 유지될 때 오류가 발생하면 이벤트가 발생하고 개체의 EntityDataSourceChangedEventArgs 속성이 반환ExceptionException 값으로 설정됩니다. 이벤트 처리기에서 예외를 Inserted 처리하는 경우 속성을 true.로 설정합니다ExceptionHandled. 이렇게 하면 예외가 다시 발생하지 않습니다. 속성 값을 falseExceptionHandled 지정하면 예외가 EntityDataSource 다시 발생합니다.

적용 대상