RepoDb.SQLite.System - a hybrid .NET ORM library for SQLite (using System.Data.SQLite.Core).
RepoDB is an open-source .NET ORM library that bridges the gaps of micro-ORMs and full-ORMs. It helps you simplify the switch-over of when to use the BASIC and ADVANCE operations during the development.
- GitHub Home Page - to learn more about the core library.
- Website - docs, features, classes, references, releases and blogs.
- GitHub - for any issues, requests and problems.
- StackOverflow - for any technical questions.
- Twitter - for the latest news.
- Gitter Chat - for direct and live Q&A.
- RepoDb - the core library of RepoDB.
- System.Data.SQLite.Core - the data provider used for SQLite (System).
Apache-2.0 - Copyright © 2019 - Michael Camara Pendon
At the Package Manager Console, write the command below.
> Install-Package RepoDb.SQLite.System
Or, visit our installation page for more information.
First, the bootstrapper must be initialized.
RepoDb.SQLiteBootstrap.Initialize();
Note: The call must be done once.
After the bootstrap initialization, any library operation can then be called.
Or, visit the official get-started page for SQLite.
using (var connection = new SQLiteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(c => c.Id == 10045);
}
var customer = new Customer
{
FirstName = "John",
LastName = "Doe",
IsActive = true
};
using (var connection = new SQLiteConnection(ConnectionString))
{
var id = connection.Insert<Customer>(customer);
}
using (var connection = new SQLiteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
customer.FirstName = "John";
customer.LastUpdatedUtc = DateTime.UtcNow;
var affectedRows = connection.Update<Customer>(customer);
}
using (var connection = new SQLiteConnection(ConnectionString))
{
var customer = connection.Query<Customer>(10045);
var deletedCount = connection.Delete<Customer>(customer);
}