SqlKata provide an easy way to execute your queries, by using the famous package Dapper.
In order to execute the queries, you need to install the needed Drivers for each Database Provider.
For Sql Server install System.Data.SqlClient package
dotnet add package System.Data.SqlClient
For Postgre Sql install Npgsql package
dotnet add package Npgsql
For MySql install MySql.Data package
dotnet add package MySql.Data
var host = "local";
var user = "sa";
var database = "healthnbeautyapp";
var password = "secret";
var cs = $"server={host};user={user};database={dbName};password={password}";
var connection = new MySqlConnection(cs);
var db = new QueryFactory(connection, new MySqlCompiler());
For SQLite install System.Data.SQLite.Core
package
dotnet add package System.Data.SQLite.Core
check this link for more information about the SQLite ADO provider https://docs.microsoft.com/en-us/dotnet/standard/data/sqlite/?tabs=netcore-cli
var cs = $"Data Source=file:mydatabase.db";
var connection = new SqliteConnection(cs);
var db = new QueryFactory(connection, new SqliteCompiler());
or if you want to use in-memory database for testing purposes
var cs = $"Data Source=file::memory:;Cache=Shared";
var connection = new SqliteConnection(cs);
var db = new QueryFactory(connection, new SqliteCompiler());