IDbConnectionInterceptor.ConnectionCreated Yöntem

Tanım

EF bir DbConnectionoluşturduğunda çağrılır. Uygulama kullanılacak bağlantıyı sağlıyorsa bu olay tetiklenmez.

public virtual System.Data.Common.DbConnection ConnectionCreated (Microsoft.EntityFrameworkCore.Diagnostics.ConnectionCreatedEventData eventData, System.Data.Common.DbConnection result);
abstract member ConnectionCreated : Microsoft.EntityFrameworkCore.Diagnostics.ConnectionCreatedEventData * System.Data.Common.DbConnection -> System.Data.Common.DbConnection
override this.ConnectionCreated : Microsoft.EntityFrameworkCore.Diagnostics.ConnectionCreatedEventData * System.Data.Common.DbConnection -> System.Data.Common.DbConnection
Public Overridable Function ConnectionCreated (eventData As ConnectionCreatedEventData, result As DbConnection) As DbConnection

Parametreler

eventData
ConnectionCreatedEventData

Bağlantı hakkında bağlamsal bilgiler.

result
DbConnection

Oluşturulan bağlantı. Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

Döndürülenler

EF'nin kullanacağı sonuç. Sonucu değiştirmeye çalışmayan herhangi bir kesme noktası için bu yöntemin uygulanması, geçirilen değeri döndürmektir result .

Şunlara uygulanır