Skip to content

SQLite Example

Required packages: Dapper.FluentMap, Microsoft.Data.Sqlite

Use an in-memory SQLite database for a compact integration example.

Use this capability when the column shape and .NET model should remain separated by explicit, reviewable configuration.

using var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
var customer = connection.QuerySingle<Customer>(sql);

FluentMap registers typed metadata and applies it through the matching materialization path. SQL, connections, parameters, and lifecycle remain responsibilities of the application and Dapper.