Out of the box Vendr v3+ only supports SQL Server based databases as this is the recomended database platform for live environments. To aid testing and rapid prototyping however, Vendr can be configured to use a SQLite database.
Installing the SQLite dependencies
To add SQLite support, you'll need to install the SQLite persistence layer NuGet package for Vendr.
PM> dotnet add package Vendr.Persistence.Sqlite
Once the NuGet package is installed, you'll then need to register SQLite support with Vendr via the IVendrBuilder
interface.
...
.AddVendr(vendrBuilder => {
vendrBuilder.AddSQLite();
})
...
If you have setup Umbraco to use SQLite, this should be all you need to do as Vendr will use the same database connection string as Umbraco, but if you wish to install Vendr into it's own SQLite database you can configure it's own connection string like so.
{
...
"ConnectionStrings": {
"umbracoDbDSN": "Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True",
"umbracoDbDSN_ProviderName": "Microsoft.Data.SQLite",
"vendrDbDSN": "Data Source=|DataDirectory|/Vendr.sqlite.db;Mode=ReadWrite;Foreign Keys=True;Pooling=True;Cache=Shared",
"vendrDbDSN_ProviderName": "Microsoft.Data.SQLite"
},
...
}