You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version 5.2.0 of Microsoft.Data.SqlClient a new callback was added to the SqlConnection class in order to retrieve an access token. What is the best place to set this property. I don’t think it’s necessary to set it on each execution of the IDbConnection interceptor like I did before with the AccessToken property, right?
@kevinharing What you have looks fine, but given that setting the callback doesn't need to be done asynchronously, and if it only needs to be done when EF creates the SqlConnection (i.e. you never create one and pass it to EF, or, if you do, it already has the callback set), then using ConnectionCreated might be better. For example:
@kevinharing What you have looks fine, but given that setting the callback doesn't need to be done asynchronously, and if it only needs to be done when EF creates the SqlConnection (i.e. you never create one and pass it to EF, or, if you do, it already has the callback set), then using ConnectionCreated might be better. For example:
In version 5.2.0 of Microsoft.Data.SqlClient a new callback was added to the SqlConnection class in order to retrieve an access token. What is the best place to set this property. I don’t think it’s necessary to set it on each execution of the IDbConnection interceptor like I did before with the AccessToken property, right?
More info on the new functionality here.
Previous:
New:
The text was updated successfully, but these errors were encountered: