Installation
Install packages using the Package Manager Console.
Raw SQLs
For raw SQL usage only:
> Install-Package RepoDb
It supports all kinds of RDBMS data providers.
SQL Server
To work with SQL Server:
> Install-Package RepoDb.SqlServer
After installation, call the globalized setup method to initialize all dependencies for SQL Server.
GlobalConfiguration
.Setup()
.UseSqlServer();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.SqlServerBootstrap.Initialize();
For bulk operations:
> Install-Package RepoDb.SqlServer.BulkOperations
System.Data.SqlClient
When using this package, bootstrap the connection object at 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);
Alternatively, replicate the SqlServerBootstrap class and call the initializer explicitly.
PostgreSQL
To work with PostgreSQL:
> Install-Package RepoDb.PostgreSql
After installation, call the globalized setup method to initialize all dependencies for PostgreSql.
GlobalConfiguration
.Setup()
.UsePostgreSql();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.PostgreSqlBootstrap.Initialize();
For bulk operations:
> Install-Package RepoDb.PostgreSql.BulkOperations
MySQL
Two packages are available for MySQL.
MySql.Data
To work with RepoDb.MySql:
> Install-Package RepoDb.MySql
After installation, call the globalized setup method to initialize all dependencies for MySQL.
GlobalConfiguration
.Setup()
.UseMySql();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.MySqlBootstrap.Initialize();
MySqlConnector
To work with RepoDb.MySqlConnector:
> Install-Package RepoDb.MySqlConnector;
After installation, call the globalized setup method to initialize all dependencies for MySQL.
GlobalConfiguration
.Setup()
.UseMySqlConector();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.MySqlConnectorBootstrap.Initialize();
SQLite
Two packages are available for SQLite.
System.Data.SQLite.Core
To work with RepoDb.SQLite.System:
> Install-Package RepoDb.SQLite.System
After installation, call the globalized setup method to initialize all dependencies for SQLite.
GlobalConfiguration
.Setup()
.UseSQLite();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.SQLiteBootstrap.Initialize();
Microsoft.Data.Sqlite
To work with RepoDb.Sqlite.Microsoft:
> Install-Package RepoDb.Sqlite.Microsoft
After installation, call the globalized setup method to initialize all dependencies for SQLite.
GlobalConfiguration
.Setup()
.UseSqlite();
For versions prior to 1.13.0, use the bootstrapper below.
RepoDb.SqliteBootstrap.Initialize();
Please visit our documentation page to learn more about this library.