Two Provider are supported regarding SQLite
- SQLite (Using Microsoft.Data.SQLite - Apache2 license)
- SDSqlite (Using System.Data.SQLite - Public domain)
Using Microsoft SQLite
Add packages in your project
dotnet add package SimpleStack.Orm
dotnet add package SimpleStack.Orm.SQLite
Sample usage
using SimpleStack.Orm;
using SimpleStack.Orm.MySQLConnector;
var factory = new OrmConnectionFactory(new SqliteDialectProvider(), "CONNECTION_STRING");
using (var connection = factory.OpenConnection())
{
// Start Querying Database
var dogs = await connection.SelectAsync<Dog>(x => x.Age > 20);
}
Using SQLite
Add packages in your project
dotnet add package SimpleStack.Orm
dotnet add package SimpleStack.Orm.SDSQLite
Sample usage
using SimpleStack.Orm;
using SimpleStack.Orm.SDSQLite;
var factory = new OrmConnectionFactory(new SqliteDialectProvider(), "CONNECTION_STRING");
using (var connection = factory.OpenConnection())
{
// Start Querying Database
var dogs = await connection.SelectAsync<Dog>(x => x.Age > 20);
}