Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: SqlProviderUtilities makes it impossible to wrap SqlClient (SqlConnection) (Worked in EF5)

$
0
0
Since SqlConnection is a sealed class; we derived custom classes from it.

Since SqlProviderUtilities throws an exception if the DbConnection argument isn't of type SqlConnection, we cannot provide a custom DbConnectionProvider that wraps SqlClient

I have a custom EF provider that wraps SqlClientFactory to provide evented diagnostic information. Everything works in EF5 -- but when trying out EF6a2, an exception is thrown from SqlProviderUtilities since my custom DbConnection cannot be cast to SqlConnection.

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>