-
Notifications
You must be signed in to change notification settings - Fork 22
Release Notes 0.9
We've added a couple of features for scenarios that are not well covered by our normal patterns.
The new GenericDbDataSource allows you to use the Chain materializers against any System.Data compatible database driver. This includes OleDB, ODBC, Oracle, and anything else that offers a DbConnection, DbCommand, and DbParameter subclass.
You can create a generic data source using either a DbProviderFactory
or generic type parameters:
new GenericDbDataSource(SqlClientFactory.Instance, "connectionString);
new GenericDbDataSource<SqlConnection, SqlCommand, SqlParameter>(connectionString);
We recommend using the DbProviderFactory as it prevents you from accidentally creating mismatched pair such as a SqlCommand with a SQLiteConnection.
In version 0.8 we were only targeting .NET 4.6.1. After reviewing the feature set that we're using, we found that we can safely offer support for earlier frameworks. In version 0.9 we offer three platforms in the Nuget package.
- .NET 4.5 (net45)
- .NET 4.6 (net46)
- Windows Universal Apps 10 (uap10)
SQL Server and compiled materializers are not available on uap10. SQLite will be once Microsoft's provider is fixed.
The generic data source is severely limited. It only exposes the raw SQL command builder.
A class 0 database is one that only exposes raw SQL commands. Data sources that meet this criteria are marked with the IClass0DataSource
interface.
With great care you can write ANSI SQL that can works against multiple databases, but it is quite difficult when you start factoring in things like schemas and case sensitivity.