ApricotFramework.DataOps.Abstractions
0.1.0
Prefix Reserved
dotnet add package ApricotFramework.DataOps.Abstractions --version 0.1.0
NuGet\Install-Package ApricotFramework.DataOps.Abstractions -Version 0.1.0
<PackageReference Include="ApricotFramework.DataOps.Abstractions" Version="0.1.0" />
<PackageVersion Include="ApricotFramework.DataOps.Abstractions" Version="0.1.0" />
<PackageReference Include="ApricotFramework.DataOps.Abstractions" />
paket add ApricotFramework.DataOps.Abstractions --version 0.1.0
#r "nuget: ApricotFramework.DataOps.Abstractions, 0.1.0"
#:package ApricotFramework.DataOps.Abstractions@0.1.0
#addin nuget:?package=ApricotFramework.DataOps.Abstractions&version=0.1.0
#tool nuget:?package=ApricotFramework.DataOps.Abstractions&version=0.1.0
ApricotFramework.DataOps
SQL lives in XML files with a schema, addressed by group and name, and executed with Dapper — so a query can be reviewed, reused across services, and written per database engine without the calling code knowing which engine it reached.
ApricotFramework.DataOps.Abstractions is the zero-dependency contract.
Install
dotnet add package ApricotFramework.DataOps.AspNetCore
dotnet add package ApricotFramework.DataOps.Abstractions # for a library that only calls IDataOperations
Usage
<DataOperations>
<DataConfiguration Compatibility="Sqlite" Timeout="PT30S" />
<OperationGroup Name="Authors">
<SqlOperation Name="All">
<TextCommand ExpectedResult="Table">
SELECT id, full_name, born_in FROM authors ORDER BY {if:byName{ full_name } else { id }}
</TextCommand>
</SqlOperation>
</OperationGroup>
</DataOperations>
builder.Services.AddDataOperations(builder.Configuration);
builder.Services.AddDataSourceConnection(SqlProvider.Sqlite, cs => new SqliteConnection(cs));
builder.Services.AddOperationsDefinitionSource<AuthorOperationsSource>();
// One operation: connect, address it, run it.
var authors = await dataOps.Connect().Query("Authors", "All")
.WithBinding("byName", true)
.ExecuteAsync<Author>();
// Several operations on one connection, in one transaction.
await using var scope = await dataOps.BeginAsync(AutoTransaction.Serializable);
await scope.Router.NonQuery("Authors", "Create").ExecuteAsync(author);
await scope.Router.NonQuery("Audit", "Append").ExecuteAsync(entry);
await scope.CommitAsync(); // disposing without this rolls back
Which engine an operation is written for is declared, not inferred: an operation compatible with
MySql PostgreSql is invisible to a SQLite connection, so the same key can carry a different
statement per engine.
Note. Column matching ignores underscores by default, so
full_namefillsFullName. This is Dapper's process-wide setting and it applies to settable properties only — a positionalrecordwill not materialize from underscored columns. Turn it off withDataOperations:MatchNamesWithUnderscores.
Full documentation at projectapricot.dev.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on ApricotFramework.DataOps.Abstractions:
| Package | Downloads |
|---|---|
|
ApricotFramework.DataOps
SQL operations declared in XML and executed with Dapper: operations are keyed by group and name, carry their own provider compatibility, timeout and transaction settings, and are called through a fluent router instead of being embedded in C#. Loads definitions from embedded resources, files or code, validated against a published XSD. |
|
|
ApricotFramework.DataProtection.DataOps
Persists the ASP.NET Core Data Protection key ring to a data source declared for ApricotFramework.DataOps, taking the connection from its registry and the SQL dialect from the data source's provider. Depends only on the DataOps contracts, so it brings no execution engine and no database driver. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 195 | 8/16/2026 |