Namespace Savvyio.Extensions.DependencyInjection.Data
Registering data stores without tying to a technology keeps the domain model portable. The Savvyio.Extensions.DependencyInjection.Data namespace provides AddDataStore<TService, T> and AddDataStore<TService, T, TOptions> for this purpose.
Start with AddDataStore<TService, T> to bind an IDataStore interface to its implementation. Choose this namespace when your domain layer depends only on the abstract IDataStore interface family and you want the concrete implementation resolved by DI without referencing a specific ORM or data-access library. For technology-specific registrations that also configure a connection or context, see Savvyio.Extensions.DependencyInjection.EFCore, Savvyio.Extensions.DependencyInjection.Dapper, or Savvyio.Extensions.DependencyInjection.DapperExtensions.
Availability: .NET 10 and .NET 9
Extension Members
| Type | Ext | Methods |
|---|---|---|
| IServiceCollection | ⬇️ | AddDataStore<TService, T>, AddDataStore<TService, T, TOptions> |
Classes
ServiceCollectionExtensions
Extension methods for the IServiceCollection interface.
Interfaces
IDataStore<T, TMarker>
Defines a generic way to support multiple implementations of data persistence based on the Data Access Object pattern aka DAO.
IDeletableDataStore<T, TMarker>
Defines a generic way to support multiple implementations of deletable data access objects (cruD).
IPersistentDataStore<T, TOptions, TMarker>
Defines a generic way to support multiple implementations of the actual I/O communication with a data store that is responsible of persisting data (CRUD).
IReadableDataStore<T, TMarker>
Defines a generic way to support multiple implementations of readable data access objects (cRud).
ISearchableDataStore<T, TOptions, TMarker>
Defines a generic way to support multiple implementations of searchable data access objects (cRud).
IWritableDataStore<T, TMarker>
Defines a generic way to support multiple implementations of writable data access objects (CrUd).