Skip to main content

Databases

MuchAdo works with any ADO.NET database provider. The key class in MuchAdo is DbConnector, which wraps a database connection and provides fluent, powerful, efficient access to the database.

If you are using a database provider with its own MuchAdo package, you should use it for optimized default settings and provider-specific features. Each provider-specific package has its own connector class that is derived from DbConnector.

MySql​

Use the MuchAdo.MySql NuGet package if you are using MySqlConnector, the recommended provider for MySQL. The connector class is MySqlDbConnector. Key enhancements:

  • uses ? for unnamed parameter placeholders
  • supports provider-specific types MySqlDateTime, MySqlDecimal, and MySqlGeometry (via MySqlDbDataMapper.Default)
  • supports async database access and command batches in older .NET frameworks
  • uses backticks when quoting SQL identifiers

PostgreSQL​

Use the MuchAdo.Npgsql NuGet package if you are using Npgsql, the recommended provider for PostgreSQL. The connector class is NpgsqlDbConnector. Key enhancements:

  • uses $1, $2, etc. for unnamed parameter placeholders, i.e. supports raw mode
  • uses strongly-typed parameters automatically to avoid boxing of value types
  • supports async database access and command batches in older .NET frameworks

SQLite​

Use the MuchAdo.Sqlite NuGet package if you are using Microsoft.Data.Sqlite, the recommended provider for SQLite. The connector class is SqliteDbConnector. Key enhancement:

  • supports deferred transactions
  • emulates command batching (not natively supported by Microsoft.Data.Sqlite as of this writing)
warning

MuchAdo.Sqlite depends on Microsoft.Data.Sqlite.Core, so it does not select a native SQLite bundle for you. Add the native bundle that suits your application, such as SQLitePCLRaw.bundle_e_sqlite3, or reference Microsoft.Data.Sqlite, which brings a bundle transitively.

SQL Server​

Use the MuchAdo.SqlServer NuGet package if you are using Microsoft.Data.SqlClient, the recommended provider for Microsoft SQL Server. The connector class is SqlServerDbConnector. Key enhancement:

  • uses brackets when quoting SQL identifiers

Other databases​

The standard MuchAdo NuGet package should work with any ADO.NET database provider, but let us know if your favorite provider doesn't work or should have its own provider-specific package.