Dreamine.Database.Abstractions
1.0.1
dotnet add package Dreamine.Database.Abstractions --version 1.0.1
NuGet\Install-Package Dreamine.Database.Abstractions -Version 1.0.1
<PackageReference Include="Dreamine.Database.Abstractions" Version="1.0.1" />
<PackageVersion Include="Dreamine.Database.Abstractions" Version="1.0.1" />
<PackageReference Include="Dreamine.Database.Abstractions" />
paket add Dreamine.Database.Abstractions --version 1.0.1
#r "nuget: Dreamine.Database.Abstractions, 1.0.1"
#:package Dreamine.Database.Abstractions@1.0.1
#addin nuget:?package=Dreamine.Database.Abstractions&version=1.0.1
#tool nuget:?package=Dreamine.Database.Abstractions&version=1.0.1
Dreamine.Database.Abstractions
Dreamine.Database.Abstractions defines the provider-neutral contracts for the Dreamine Database package family.
Package Role
This package is the lowest-level database contract layer. It contains only shared options, provider identifiers, mapping attributes, and the IDatabaseProvider CRUD contract.
Application / Samples / Tests
↓
Dreamine.Database.Abstractions
↑
Database.Core / SQLite / MySQL / Oracle / SQL Server
Concrete database providers should depend on this package instead of exposing vendor-specific APIs to application code.
Features
IDatabaseProvidercommon CRUD contractDatabaseProviderKindprovider identifierDatabaseConnectionOptionsconnection metadata- Mapping attributes for table, key, generated, ignored, and column names
- Sync and async APIs for database initialization, table checks, commands, scalar queries, reads, inserts, updates, and deletes
Mapping Attributes
| Attribute | Purpose |
|---|---|
DatabaseTableAttribute |
Overrides the table name for an entity. |
DatabaseColumnAttribute |
Overrides the column name for a property. |
DatabaseKeyAttribute |
Marks the primary key property. |
DatabaseGeneratedAttribute |
Marks a database-generated key column. |
DatabaseIgnoreAttribute |
Excludes a property from database mapping. |
Minimal Entity
using Dreamine.Database.Abstractions.Mapping;
[DatabaseTable("SampleCustomers")]
public sealed class SampleCustomer
{
[DatabaseKey]
[DatabaseGenerated]
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Role { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
}
Design Principles
- Keep application code independent from concrete database drivers.
- Keep mapping metadata small and attribute-based.
- Keep provider APIs consistent across SQLite, MySQL, Oracle, and SQL Server.
- Avoid bringing Dapper or vendor driver dependencies into the contract package.
Dependencies
None.
Target Framework
net8.0
Related Packages
Dreamine.Database.CoreDreamine.Database.SqliteDreamine.Database.MySqlDreamine.Database.OracleDreamine.Database.SqlServer
Samples and Tests
- Unit tests:
20_SOURCES/200. Tests/Dreamine.FullKit.Tests/Database - WPF sample:
20_SOURCES/998. DEMO/000. Sample/010. Wpfs/SampleSmart/Pages/PageSub/PageDatabase.xaml
License
MIT License
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Dreamine.Database.Abstractions:
| Package | Downloads |
|---|---|
|
Dreamine.Database.Core
Core database runtime for Dreamine Database, including Dapper-based provider helpers and entity mapping. |
|
|
Dreamine.Database.FullKit
All-in-one meta package for Dreamine Database libraries. Includes Abstractions, Core, and providers for MySQL, Oracle, SQL Server, and SQLite. |
|
|
Dreamine.Database.SqlServer
SQL Server provider for Dreamine Database. |
|
|
Dreamine.Database.MySql
MySQL provider for Dreamine Database. |
|
|
Dreamine.Database.Sqlite
SQLite provider for Dreamine Database. |
GitHub repositories
This package is not used by any popular GitHub repositories.