Last update:
August 24, 2024
Configure VC with DB Providers¶
Virto Commerce is built on a DB agnostic architecture. The following databases are supported out of the box:
- Microsoft SQL Server.
- MySql Server.
- PostgreSQL.
At the same time, Virto Commerce Architectire allows you add custom database provider on top of Entity Framework for solution as well as for a specific module.
Select the tab with the required provider setup information.
Supported version: Microsoft SQL Server 2019 or higher
To setup DB Provider:
- Install and configure database. Run the SQL command
CREATE DATABASE [database_name];
to create a new database. - Create a user with access to the database.
- Open the appsettings.json file in Visual Studio or other text editor.
- Change
DatabaseProvider
to"SqlServer"
. -
Change
ConnectionStrings
as follows:
Supported version: MySql Server 5.7 or higher.
To setup DB Provider:
- Install and configure database. Run the SQL command
CREATE DATABASE [database_name];
to create a new database. - Create a user with access to the database.
- Open the appsettings.json file in Visual Studio or other text editor.
- Change
DatabaseProvider
to"MySql"
. -
Change
ConnectionStrings
as follows:"DatabaseProvider": "MySql", "ConnectionStrings": { "VirtoCommerce": "Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;" },
or
Supported version: PostgreSQL 12 or higher.
To setup DB Provider:
- Install and configure database. Run the SQL command
CREATE DATABASE [database_name];
to create a new database. - Create a user with access to the database.
- Open the appsettings.json file in Visual Studio or other text editor.
- Change
DatabaseProvider
to"PostgreSql"
. -
Change "ConnectionString" as follows: