BridgingIT.DevKit.Common.Abstractions
10.0.104-preview.0.2
dotnet add package BridgingIT.DevKit.Common.Abstractions --version 10.0.104-preview.0.2
NuGet\Install-Package BridgingIT.DevKit.Common.Abstractions -Version 10.0.104-preview.0.2
<PackageReference Include="BridgingIT.DevKit.Common.Abstractions" Version="10.0.104-preview.0.2" />
<PackageVersion Include="BridgingIT.DevKit.Common.Abstractions" Version="10.0.104-preview.0.2" />
<PackageReference Include="BridgingIT.DevKit.Common.Abstractions" />
paket add BridgingIT.DevKit.Common.Abstractions --version 10.0.104-preview.0.2
#r "nuget: BridgingIT.DevKit.Common.Abstractions, 10.0.104-preview.0.2"
#:package BridgingIT.DevKit.Common.Abstractions@10.0.104-preview.0.2
#addin nuget:?package=BridgingIT.DevKit.Common.Abstractions&version=10.0.104-preview.0.2&prerelease
#tool nuget:?package=BridgingIT.DevKit.Common.Abstractions&version=10.0.104-preview.0.2&prerelease
Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles.
Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs.
This repository includes the complete source code for the bITDevKit, along with a variety of sample applications located in the ./examples folder within the solution. These samples serve as practical demonstrations of how to leverage the capabilities of the bITDevKit in real-world scenarios. All components are available as nuget packages.
For the latest updates and release notes, please refer to the CHANGELOG.
Join us in advancing the world of software development with the bITDevKit!
Result.cs Overview
The
Resultclass encapsulates the outcome of an operation, promoting an expressive and error-tolerant way to handle success and failure states.
The Result class is a central component designed to encapsulate the outcome of an operation,
providing a way to represent both successful and failed operations. This class promotes a more
expressive and error-tolerant approach to handling operation results, encouraging the explicit
declaration of success or failure states.
Returning a Result
To return a Result from a method, you typically define the method to return Result or
Result<T>, where T is the type of the value returned in case of success. Here is an example
method returning a Result:
public Result PerformOperation()
{
// Your logic here
if (success)
{
return Result.Success();
}
else
{
return Result.Failure(new Error("Operation Failed"));
}
}
Handling a Result
When you receive a Result from a method, you can handle it by checking its success or failure
state. Here's an example:
var result = PerformOperation();
if (result.IsSuccess)
{
// Handle success
}
else
{
// Handle failure
var error = result.Error;
Console.WriteLine(error.Message);
}
Using Typed Results
Sometimes, you may want to return a result with a value. This is where Result<T> comes in handy:
public Result<int> CalculateSum(int a, int b)
{
if (a < 0 || b < 0)
{
return Result.Failure<int>(new Error("Inputs must be non-negative"));
}
return Result.Success(a + b);
}
Handling a Result<T> involves extracting the value if the operation was successful:
var result = CalculateSum(5, 10);
if (result.IsSuccess)
{
int sum = result.Value;
Console.WriteLine($"Sum: {sum}");
}
else
{
Console.WriteLine(result.Error.Message);
}
Typed Errors
Typed errors provide a more specific and structured way to handle different error scenarios. For
example, the EntityNotFoundResultError class can be used to represent an error where an entity is
not found:
EntityNotFoundResultError.cs:
public class EntityNotFoundResultError : Error
{
public EntityNotFoundResultError(string entityName, object key)
: base($"Entity '{entityName}' with key '{key}' was not found.")
{
}
}
You can return this typed error as follows:
public Result GetEntity(int id)
{
var entity = repository.FindById(id);
if (entity == null)
{
return Result.Failure(new EntityNotFoundResultError("EntityName", id));
}
return Result.Success(entity);
}
When handling the result, you can check if the error is of a specific type:
var result = GetEntity(1);
if (result.IsSuccess)
{
// Handle success
}
else if (result.Error is EntityNotFoundResultError)
{
var error = (EntityNotFoundResultError)result.Error;
Console.WriteLine(error.Message);
}
else
{
// Handle other errors
}
Other available typed errors are:
By using typed errors, you can create more expressive and manageable error handling in your application.
| 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
- Ensure.That (>= 10.1.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.3)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on BridgingIT.DevKit.Common.Abstractions:
| Package | Downloads |
|---|---|
|
BridgingIT.DevKit.Common.Utilities
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs. |
|
|
BridgingIT.DevKit.Common.Serialization
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs. |
|
|
BridgingIT.DevKit.Common.Results
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs. |
|
|
BridgingIT.DevKit.Domain
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs. |
|
|
BridgingIT.DevKit.Application.Storage
bITdevKit: Empowering developers with modular components for modern application development, centered around Domain-Driven Design principles. Our goal is to empower developers by offering modular components that can be easily integrated into your projects. Whether you're working with repositories, commands, queries, or other components, the bITDevKit provides flexible solutions that can adapt to your specific needs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.104-preview.0.2 | 0 | 3/20/2026 |
| 10.0.104-preview.0.1 | 35 | 3/19/2026 |
| 10.0.103 | 71 | 3/19/2026 |
| 10.0.102 | 467 | 2/25/2026 |
| 10.0.101 | 431 | 2/20/2026 |
| 10.0.101-preview.0.1 | 93 | 2/20/2026 |
| 10.0.100 | 454 | 2/20/2026 |
| 10.0.2-preview.0.92 | 108 | 2/20/2026 |
| 10.0.2-preview.0.91 | 89 | 2/20/2026 |
| 10.0.2-preview.0.90 | 91 | 2/20/2026 |
| 10.0.2-preview.0.89 | 96 | 2/20/2026 |
| 10.0.2-preview.0.88 | 101 | 2/19/2026 |
| 10.0.2-preview.0.87 | 547 | 2/17/2026 |
| 10.0.2-preview.0.86 | 122 | 2/17/2026 |
| 10.0.2-preview.0.85 | 168 | 2/4/2026 |
| 10.0.2-preview.0.83 | 337 | 1/30/2026 |
| 10.0.2-preview.0.82 | 107 | 1/20/2026 |
| 10.0.2-preview.0.80 | 152 | 1/20/2026 |
| 10.0.2-preview.0.79 | 110 | 1/20/2026 |
| 9.0.1 | 863 | 2/27/2026 |
# Changelog
This changelog is maintained from version tags in the `main` branch. It covers the full tagged release history on `main`.
## [10.0.103] - 2026-03-19
- Added the new `Application.DataPorter` framework for multi-format import and export.
- Introduced profile-based and attribute-based configuration, validation, streaming, compression, templates, typed row interception, progress reporting, and extensible custom formats.
- Added fluent import, export, and template option builders for a more discoverable API.
## [10.0.102] - 2026-02-25
- Updated core package dependencies including Cosmos, Scalar.AspNetCore, and the test SDK.
## [10.0.101] - 2026-02-20
- Updated the .NET 10 toolchain and package baseline to 10.0.103.
## [10.0.100] - 2026-02-20
- Merged the main .NET 10 update baseline for the SDK and package set.
## [9.0.30] - 2025-12-19
- Updated permission evaluation responses to return collections consistently.
- Added implicit string-to-permission conversion support.
- Performed general maintenance and dependency refresh work.
## [10.0.1] - 2025-11-26
- Added string-based include options and refined permission evaluation behavior.
- Improved permission APIs with implicit string conversion support.
- Refreshed EF Core 10 and related package dependencies.
## [9.0.29] - 2025-11-18
- Refreshed NuGet dependencies.
## [9.0.28] - 2025-11-18
- Added new result operation saga scope helpers and related task extensions for multi-step workflows.
- Continued the `Result<T>`-based workflow improvements around operation scopes.
## [10.0.0] - 2025-11-12
- Started the .NET 10 release line.
- Improved logging and transaction pipeline behavior, especially around EF Core and scoped behavior execution.
- Added requester and notifier authorization pipeline attributes, `ClaimsPrincipal` support for `ICurrentUserAccessor`, and a new CORS configuration feature for presentation projects.
## [9.0.27] - 2025-10-30
- Added tracing support through the new `TracingBehavior` naming and improved job-related logging.
- Refreshed dependencies.
## [9.0.26] - 2025-10-29
- Added a new interactive console command feature and expanded console command support.
- Improved EF permission-provider handling for typed entity IDs.
## [9.0.25] - 2025-10-21
- Refactored authentication configuration into a clearer options model.
- Added JWT authentication extension methods.
- Improved OpenAPI metadata and Scalar integration.
## [9.0.24] - 2025-10-19
- Added richer `ProblemDetails` support including schema and document transformers.
- Improved JSON serialization safety and error handling.
- Tightened confidentiality for token-validation logging.
## [9.0.23] - 2025-10-17
- Added `FilterModel` parsing support for Minimal APIs.
- Standardized `ProblemDetails` and improved result-related error handling and logging.
- Updated dependencies to address security issues.
## [9.0.22] - 2025-10-13
- Changed filter paging defaults so `page = 0` and `pageSize = 0` mean no paging.
## [9.0.21] - 2025-10-09
- Expanded the `Result` API with `Bind` and `BindAsync` methods.
- Updated `DeleteResultAsync` to return both the result and the entity.
- Added `ModuleDbContextFactory` support and continued paging and tracking configuration improvements.
## [9.0.20] - 2025-10-02
- Minor maintenance release focused on internal cleanup and documentation updates.
## [9.0.19] - 2025-10-01
- Added OpenAPI document-generation startup paths and related example integration work.
## [9.0.18] - 2025-09-30
- Improved the `Notifier` and `Requester` builder APIs.
- Added `INotificationHandler` support to `DomainEventHandlerBase`.
- Added a new repository-backed domain-event publisher behavior.
## [9.0.17] - 2025-09-30
- Refined Roslyn generator project setup and refreshed dependencies.
## [9.0.16] - 2025-09-29
- Reduced mediator dependencies in the domain layer and improved result usage in the example application.
## [9.0.15] - 2025-09-28
- Updated the DoFiesta example application.
## [9.0.14] - 2025-09-24
- Removed the `Infrastructure.Azure.HealthChecks` project.
## [9.0.13] - 2025-09-24
- Removed health check support that depended on external packages.
## [9.0.12] - 2025-09-24
- Prepared the codebase for .NET 10 by updating obsolete web and OpenAPI integration points.
## [9.0.11] - 2025-09-23
- Removed the Pulsar message broker integration.
## [9.0.10] - 2025-09-22
- Added a new Active Record capability.
- Added processing jitter support for domain and message outboxes.
## [9.0.9] - 2025-08-19
- Added batched delete support for log maintenance.
## [9.0.8] - 2025-08-07
- Added delay jitter support to the notification outbox.
## [9.0.7] - 2025-08-05
- Follow-up stabilization release with no additional notable user-facing changes beyond `9.0.6`.
## [9.0.6] - 2025-08-05
- Fixed the Quartz configuration key handling.
- Improved `Requester` and `Notifier` performance and supporting infrastructure.
- Continued domain-event handling enhancements.
## [9.0.5] - 2025-07-09
- Maintenance release focused on repository housekeeping and project-structure cleanup.
## [9.0.4] - 2025-07-08
- Improved file compression option handling.
- Refined file-storage decompression defaults based on archive extension.
- Improved CSV and text logging output.
## [9.0.3] - 2025-07-04
- Added support for skipping SMTP server certificate validation.
## [9.0.2] - 2025-07-02
- Updated the framework baseline to .NET 9.
## [9.0.1] - 2025-05-19
- Documentation refresh release for the .NET 9 line.
## [3.0.4] - 2025-01-25
- Added entity permissions and a new identity provider capability.
- Enhanced repository behavior, including concurrency support for Cosmos, EF, and in-memory repositories.
- Renamed `PagedResult` and continued repository reliability improvements.
## [3.0.3] - 2024-10-11
- Improved module matching for inbound HTTP requests.
- Delivered a broad set of tracing and activity-correlation fixes.
- Added a more useful `Result.ToString()` implementation.
## [3.0.2] - 2024-04-25
- Enabled request logging with corrected Serilog setup.
- Applied post-release fixes and workflow cleanup.
## [3.0.1] - 2024-04-25
- Initial tagged release.
