IDbConnectionInterceptor.ConnectionOpening(DbConnection, ConnectionEventData, InterceptionResult) Yöntem

Tanım

EF 'in çağrılması için yeterlidir Open() .

public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult ConnectionOpening (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result);
abstract member ConnectionOpening : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult
Public Function ConnectionOpening (connection As DbConnection, eventData As ConnectionEventData, result As InterceptionResult) As InterceptionResult

Parametreler

connection
DbConnection

Bağlantı.

eventData
ConnectionEventData

Bağlantıyla ilgili bağlamsal bilgiler.

result
InterceptionResult

Bir varsa geçerli sonucu temsil eder. Bu değer, IsSuppressed true bazı önceki bir yakalayıcıyı çağırarak yürütülecektir olarak ayarlanır Suppress() . Bu değer genellikle bu yöntemin uygulanması için dönüş değeri olarak kullanılır.

Döndürülenler

InterceptionResult

IsSuppressedYanlış ise, EF normal olarak devam eder. IsSuppressedTrue Ise EF, gerçekleştirmek üzere olduğu işlemi bastırır. Bu yöntemin, işlemi bastırmaya çalışan her bir şifre için normal bir uygulama, result geçirilen değeri döndürmesidir.

Şunlara uygulanır