Flowsy.Db.Abstractions
0.1.0
See the version list below for details.
dotnet add package Flowsy.Db.Abstractions --version 0.1.0
NuGet\Install-Package Flowsy.Db.Abstractions -Version 0.1.0
<PackageReference Include="Flowsy.Db.Abstractions" Version="0.1.0" />
<PackageVersion Include="Flowsy.Db.Abstractions" Version="0.1.0" />
<PackageReference Include="Flowsy.Db.Abstractions" />
paket add Flowsy.Db.Abstractions --version 0.1.0
#r "nuget: Flowsy.Db.Abstractions, 0.1.0"
#:package Flowsy.Db.Abstractions@0.1.0
#addin nuget:?package=Flowsy.Db.Abstractions&version=0.1.0
#tool nuget:?package=Flowsy.Db.Abstractions&version=0.1.0
Flowsy Db Abstractions
Connection Factory
The interface IDbConnectionFactory represents a mechanism to create database connections from a list of registered configurations identified by unique keys.
Unit Of Work
The interface IUnitOfWork represents an atomic operation for the underlying data store. For example, for a SQL database, a class implementing IUnitOfWork shall be a wrapper for IDbTransaction objects.
On the other hand, implementations of IUnitOfWorkFactory shall create instances of the requested type of unit of work. A unit of work shall group a set of repositories or other kinds of objects designed to access data, which are related in the context of a given operation.
For example, to create an invoice, we may need to create two kinds of entities:
- Invoice
- InvoiceId
- CustomerId
- CreateDate
- Total
- Taxes
- GrandTotal
- InvoiceItem
- InvoiceItemId
- InvoiceId
- ProductId
- Quantity
- Amount
The way of completing such operation from an application-level command handler could be:
public class CreateInvoiceCommandHandler
{
public async Task<CreateInvoiceCommandResult> HandleAsync(CreateInvoiceCommand command, CancellationToken cancellationToken)
{
// Begin operation
// IUnitOfWork inherits from IDisposable and IAsyncDisposable, if any exception is thrown, the current operation shall be rolled back
await using var unitOfWork = unitOfWorkFactory.Create<ICreateInvoiceUnitOfWork>();
var invoice = new Invoice();
// Populate invoice object from properties of command object
// Create the Invoice entity
var invoiceId = await unitOfWork.InvoiceRepository.CreateAsync(invoice, cancellationToken);
// Create all the InvoiceItem entities
foreach (var item in command.Items)
{
var invoiceItem = new InvoiceItem();
// Populate invoiceItem object from properties of item object
// Create each InvoiceItem entity
await unitOfWork.InvoiceItemRepository.CreateAsync(invoiceItem, cancellationToken);
}
// Commit the current operation
await unitOfWork.CommitAsync(cancellationToken);
// Return the result of the operation
return new CreateInvoiceCommandResult
{
InvoiceId = invoiceId
};
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Flowsy.Db.Abstractions:
| Package | Downloads |
|---|---|
|
Flowsy.Db.Sql
Components for managing connections for SQL databases and perform related operations through database transactions. |
|
|
Flowsy.Db.Conventions
Provides wrapper extensions for Dapper to set naming and formatting conventions for database objects like tables, columns, routines and parameters. |
|
|
Flowsy.Db.Agent
Provides functionality to perform administrative tasks on a database like creating databases, running migrations, importing and exporting data, etc. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 6.0.0 | 1,195 | 12/5/2024 |
| 5.3.1 | 267 | 12/5/2024 |
| 5.3.0 | 229 | 12/5/2024 |
| 5.2.0 | 162 | 12/5/2024 |
| 5.1.0 | 160 | 12/5/2024 |
| 5.0.1 | 160 | 12/5/2024 |
| 5.0.0 | 163 | 12/5/2024 |
| 4.0.0 | 162 | 12/1/2024 |
| 3.1.1 | 979 | 10/28/2024 |
| 3.1.0 | 184 | 10/28/2024 |
| 3.0.0 | 184 | 10/28/2024 |
| 2.2.1 | 200 | 10/28/2024 |
| 2.2.0 | 149 | 10/28/2024 |
| 2.1.0 | 156 | 10/26/2024 |
| 2.0.1 | 151 | 10/26/2024 |
| 2.0.0 | 193 | 10/26/2024 |
| 1.1.0 | 440 | 2/9/2024 |
| 1.0.0 | 314 | 2/3/2024 |
| 0.2.0 | 1,067 | 11/26/2023 |
| 0.1.1 | 317 | 10/24/2023 |
| 0.1.0 | 549 | 10/24/2023 |