Namespace Savvyio.Extensions.DependencyInjection.Dapper
Dapper persistence needs both a connection factory and a data store. The Savvyio.Extensions.DependencyInjection.Dapper namespace provides AddDapperDataSource<TMarker> for the connection factory and AddDapperDataStore<TService, T> for each data store, combining both concerns in one namespace.
Start with AddDapperDataSource<TMarker> to configure the connection and register IDapperDataSource. Then add AddDapperDataStore<TService, T> for each data store your application needs. Choose this namespace when you want lightweight, handwritten SQL via Dapper without an ORM; for convention-based automatic CRUD instead, prefer Savvyio.Extensions.DependencyInjection.DapperExtensions, and for EF Core, use Savvyio.Extensions.DependencyInjection.EFCore.
Availability: .NET 10 and .NET 9
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IServiceCollection | ⬇️ | AddDapperDataSource, AddDapperDataSource<TMarker>, AddDapperDataSource<TService>, AddDapperDataStore<TService, T> |
Classes
DapperDataSourceOptions<TMarker>
Configuration options for IDapperDataSource<TMarker>.
DapperDataSource<TMarker>
Provides a default implementation of the IDapperDataSource<TMarker> interface to support the actual I/O communication with a source of data using Dapper.
ServiceCollectionExtensions
Extension methods for the IServiceCollection interface.
Interfaces
IDapperDataSource<TMarker>
Defines a generic way to support multiple implementations that does the actual I/O communication with a source of data optimized for Dapper.