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
Once installed, call the globalized setup method to initialize all the dependencies for SQL Server.
GlobalConfiguration
.Setup()
.UseSqlServer();
For the users prior the version 1.13.0, use the bootstrapper code below.
RepoDb.SqlServerBootstrap.Initialize();
Or, if you are to work with the bulk operations.
> Install-Package RepoDb.SqlServer.BulkOperations
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
Once installed, call the globalized setup method to initialize all the dependencies for PostgreSql.
GlobalConfiguration
.Setup()
.UsePostgreSql();
For the users prior the version 1.13.0, use the bootstrapper code below.
RepoDb.PostgreSqlBootstrap.Initialize();
Or, if you are to work with the bulk operations.
> Install-Package RepoDb.PostgreSql.BulkOperations
MySQL
There are 2 packages available for MySQL.
MySql.Data
If you wish to work with RepoDb.MySql.
> Install-Package RepoDb.MySql
Once installed, call the globalized setup method to initialize all the dependencies for MySQL.
GlobalConfiguration
.Setup()
.UseMySql();
For the users prior the version 1.13.0, use the bootstrapper code below.
RepoDb.MySqlBootstrap.Initialize();
MySqlConnector
If you wish to work with RepoDb.MySqlConnector.
> Install-Package RepoDb.MySqlConnector;
Once installed, call the globalized setup method to initialize all the dependencies for MySQL.
GlobalConfiguration
.Setup()
.UseMySqlConector();
For the users prior the version 1.13.0, use the bootstrapper code below.
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
Once installed, call the globalized setup method to initialize all the dependencies for SQLite.
GlobalConfiguration
.Setup()
.UseSQLite();
For the users prior the version 1.13.0, use the bootstrapper code below.
RepoDb.SQLiteBootstrap.Initialize();
Microsoft.Data.Sqlite
If you wish to work with RepoDb.Sqlite.Microsoft.
> Install-Package RepoDb.Sqlite.Microsoft
Once installed, call the globalized setup method to initialize all the dependencies for SQLite.
GlobalConfiguration
.Setup()
.UseSqlite();
For the users prior the version 1.13.0, use the bootstrapper code below.
RepoDb.SqliteBootstrap.Initialize();
Please visit our documentation page to learn more about this library.