Installation
The packages can be installed using the Package Manager Console window.
Raw SQLs
If you wish to work only with raw-SQLs.
> Install-Package RepoDb
It supports all kinds of RDBMS data providers.
SQL Server
If you wish to work with SQL Server.
> Install-Package RepoDb.SqlServer
Or, if you are to work with the bulk operations.
> Install-Package RepoDb.SqlServer.BulkOperations
Then, call the bootstrapper to initialize the needed references.
RepoDb.SqlServerBootstrap.Initialize();
System.Data.SqlClient
If you are working with this package, you are required to bootstrap the connection object on the startup.
var dbSetting = new SqlServerDbSetting();
DbSettingMapper
.Add<System.Data.SqlClient.SqlConnection>(dbSetting, true);
DbHelperMapper
.Add<System.Data.SqlClient.SqlConnection>(new SqlServerDbHelper(), true);
StatementBuilderMapper
.Add<System.Data.SqlClient.SqlConnection>(new SqlServerStatementBuilder(dbSetting), true);
Or, you can replicate the actual SqlServerBootstrap class implementation and attach it to your solution. Then, call the local class initializer method explicitly.
PostgreSQL
If you wish to work with PostgreSQL.
> Install-Package RepoDb.PostgreSql
Or, if you are to work with the bulk operations.
> Install-Package RepoDb.PostgreSql.BulkOperations
Then, call the bootstrapper to initialize the needed references.
RepoDb.PostgreSqlBootstrap.Initialize();
MySQL
There are 2 packages available for MySQL.
MySql.Data
If you wish to work with RepoDb.MySql.
> Install-Package RepoDb.MySql
Then, call the bootstrapper to initialize the needed references.
RepoDb.MySqlBootstrap.Initialize();
MySqlConnector
If you wish to work with RepoDb.MySqlConnector.
> Install-Package RepoDb.MySqlConnector;
Then, call the bootstrapper to initialize the needed references.
RepoDb.MySqlConnectorBootstrap.Initialize();
SQLite
There are 2 packages available for SQLite.
System.Data.SQLite.Core
If you wish to work with RepoDb.SQLite.System.
> Install-Package RepoDb.SQLite.System
Then, call the bootstrapper to initialize the needed references.
RepoDb.SQLiteBootstrap.Initialize();
Microsoft.Data.Sqlite
If you wish to work with RepoDb.Sqlite.Microsoft.
> Install-Package RepoDb.Sqlite.Microsoft
Then, call the bootstrapper to initialize the needed references.
RepoDb.SqliteBootstrap.Initialize();
Please visit our documentation page to learn more about this library.