Skip to content

Latest commit

 

History

History
160 lines (107 loc) · 3.67 KB

File metadata and controls

160 lines (107 loc) · 3.67 KB

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 AmpScm.RepoDb

It supports all kinds of RDBMS data providers.

SQL Server

If you wish to work with SQL Server.

> Install-Package AmpScm.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 AmpScm.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 AmpScm.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 AmpScm.RepoDb.PostgreSql.BulkOperations

MySQL

There are 2 packages available for MySQL.

MySql.Data

If you wish to work with RepoDb.MySql.

> Install-Package AmpScm.RepoDb.MySql

Once installed, call the globalized setup method to initialize all the dependencies for MySQL.

GlobalConfiguration
	.Setup()
	.UseMySql();

MySqlConnector

If you wish to work with RepoDb.MySqlConnector.

> Install-Package AmpScm.RepoDb.MySqlConnector;

Once installed, call the globalized setup method to initialize all the dependencies for MySQL.

GlobalConfiguration
	.Setup()
	.UseMySqlConector();

SQLite

There are 2 packages available for SQLite.

System.Data.SQLite.Core

If you wish to work with RepoDb.SQLite.System.

> Install-Package AmpScm.RepoDb.SQLite.System

Once installed, call the globalized setup method to initialize all the dependencies for SQLite.

GlobalConfiguration
	.Setup()
	.UseSQLite();

Microsoft.Data.Sqlite

If you wish to work with RepoDb.Sqlite.Microsoft.

> Install-Package AmpScm.RepoDb.Sqlite.Microsoft

Once installed, call the globalized setup method to initialize all the dependencies for SQLite.

GlobalConfiguration
	.Setup()
	.UseSqlite();

Please visit our documentation page to learn more about this library.