Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Edited Issue: SqlClientProviderServices may throw System.ArgumentException: The provider manifest given is not of type 'System.Data.SqlClient.SqlProviderManifest' [202]

$
0
0
"SqlClientProviderServices is using StoreItemCollection.StoreProviderManifest to get store provider manifest checks if this is a SqlProviderManifest, and if it is not then it throws. There are a few issues with this:
- for wrapping providers (vide EFCaching/EFTracing providers) it does not work since the manifest stored in StoreProviderManifest is acutally a manifest wrapping SqlProviderManifest
- StoreItemCollection.StoreProviderManifest is an internal field - it means that SqlClientProviderServices is able to see what a third party provider is not able to see
- SqlClientProviderServices is kind of breaking a contract by trying to upcast StoreProviderManifest to SqlProviderManifest - we probably should work with just DbProviderManifest

The above may indicate that either there is a problem with SqlClientProviderServices et al or the design of our provider model is broken and SqlClientProviderServices is working around these problems
The above shows up immediately when using CodeFirst since the code that causes problems is in CreateDatabase() code path but we should also review other places to see if we are using non-public methods or make assumptions that don't have to be true."

This item was migrated from the DevDiv work item tracking system [ID=385243].


Viewing all articles
Browse latest Browse all 10318

Trending Articles



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