FransBouma / LinqToSQL2

Official Linq to SQL fork. A complete ORM which is backwards compatible with Linq to SQL but with new features.
Other
57 stars 22 forks source link

Give me info about the current provider #19

Open MikaelEliasson opened 9 years ago

MikaelEliasson commented 9 years ago

When writing extensions for EF it's actually incredibly hard to find out what DB engine is being used. You end up checking the connection which is a problem if that is wrapped because of things like profiling. (Don't get me started on what I feel about the IConnection design)

Simply being able to get the info about the db or the provider being used would solve this.

FransBouma commented 9 years ago

This should indeed be possible without a lot of hoops.

I've planned to factor out the DB engines, I don't think they'll be placed in different assemblies, as they'll use DbProviderFactory. Additionally, there will be compatibility modes, so the engine can be set into compatibility mode X so it will generate SQL matching the DBs of vX, e.g. compatibility mode for SQL server 2005 or 2008 or 2012. So combined this info should give you what you want. Though in general I think this should be taken into account for extensibility points to the engine: it's of no use if data is available but there are no ways to extend the engine to begin with ;).