![]() |
VOOZH | about |
dotnet add package SOFTURE.Results --version 0.3.1
NuGet\Install-Package SOFTURE.Results -Version 0.3.1
<PackageReference Include="SOFTURE.Results" Version="0.3.1" />
<PackageVersion Include="SOFTURE.Results" Version="0.3.1" />Directory.Packages.props
<PackageReference Include="SOFTURE.Results" />Project file
paket add SOFTURE.Results --version 0.3.1
#r "nuget: SOFTURE.Results, 0.3.1"
#:package SOFTURE.Results@0.3.1
#addin nuget:?package=SOFTURE.Results&version=0.3.1Install as a Cake Addin
#tool nuget:?package=SOFTURE.Results&version=0.3.1Install as a Cake Tool
A collection of shared .NET libraries providing foundational building blocks for domain-driven design, result handling, contracts, settings management, and common language primitives.
Supported frameworks: net6.0, net8.0, net9.0, net10.0
Domain-driven design library providing base entity and repository abstractions. Includes Entity<TIdentifier> with domain event support, AuditableEntity<TIdentifier> with audit tracking, StatefulEntity<TIdentifier, TState, TAction> implementing the state machine pattern, IAggregateRoot marker interface, and repository contracts (IBaseRepository, IReadBaseRepository) for entity persistence.
Functional error handling library built on top of CSharpFunctionalExtensions. Provides the Error record type with formatting/parsing support and predefined CommonErrors constants for consistent error representation across the solution.
Common request/response contracts and messaging infrastructure. Includes RequestBase, GetRequestBase (with query string generation), PostRequestBase, DeleteRequestBase, PaginationRequestBase (with page/element properties), and the IMessage marker interface for messaging patterns.
Configuration management extensions for IServiceCollection. Provides the GetSettings<TSettings, TResult> extension method for resolving, binding, and selecting settings from the dependency injection container using IOptions<T>.
Primitive language constructs and assembly markers. Includes IdentifierBase<T> abstract record for strongly-typed identifiers, IIdentifier marker interface, and IAssemblyMarker for assembly discovery.
public sealed record UserId(Guid Value) : IdentifierBase<Guid>(Value);
public sealed class User : AuditableEntity<UserId>, IAggregateRoot
{
public string Name { get; private set; }
public string Email { get; private set; }
}
public interface IUserRepository : IBaseRepository<User, UserId> { }
public interface IUserReadRepository : IReadBaseRepository<User, UserId> { }
IBaseRepository<TEntity, TIdentifier> — full CRUD repository for aggregate roots| Method | Return Type | Description |
|---|---|---|
GetAsync(TIdentifier id) |
Task<Result<TEntity>> |
Get entity by identifier |
AddAsync(TEntity entity) |
Task<Result<TEntity>> |
Add a new entity |
UpdateAsync(TEntity entity) |
Task<Result<TEntity>> |
Update an existing entity |
RemoveAsync(TEntity entity) |
Task<Result> |
Remove an entity |
IReadBaseRepository<TEntity, TIdentifier> — read-only repository| Method | Return Type | Description |
|---|---|---|
GetAsync(TIdentifier id) |
Task<Maybe<TEntity>> |
Get entity by identifier |
GetAllAsync() |
Task<Maybe<IEnumerable<TEntity>>> |
Get all entities |
FindAsync(predicate) |
Task<Maybe<IEnumerable<TEntity>>> |
Find entities matching a predicate |
PaginateAsync(page, elements, predicate) |
Task<Maybe<IEnumerable<TEntity>>> |
Paginate entities with a predicate |
CountAsync(predicate?) |
Task<Maybe<int>> |
Count entities with an optional predicate |
public sealed class Order : StatefulEntity<OrderId, OrderState, OrderAction>
{
public Order()
{
StateMachine.Configure(OrderState.New)
.Permit(OrderAction.Confirm, OrderState.Confirmed);
StateMachine.Configure(OrderState.Confirmed)
.Permit(OrderAction.Ship, OrderState.Shipped);
}
public Result Confirm() => PerformIfPossible(
OrderAction.Confirm,
new Error("Order.CannotConfirm", "Order cannot be confirmed."));
}
public static class UserErrors
{
public static readonly Error NotFound = new("User.NotFound", "User was not found.");
public static readonly Error AlreadyExists = new("User.AlreadyExists", "User already exists.");
}
var error = Error.Parse("User.NotFound|User was not found.");
string message = UserErrors.NotFound.Build();
public sealed class GetUsersRequest : PaginationRequestBase
{
public string? Search { get; set; }
}
public sealed class CreateUserRequest : PostRequestBase
{
public string Name { get; set; }
public string Email { get; set; }
public override void Clear()
{
Name = string.Empty;
Email = string.Empty;
}
}
var connectionString = services.GetSettings<DatabaseSettings, string>(s => s.ConnectionString);
private readonly MySettings _mySettings;
public MyController(IOptions<MySettings> options)
{
_mySettings = options.Value;
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on SOFTURE.Results:
| Package | Downloads |
|---|---|
|
SOFTURE.Common.HealthCheck
SOFTURE - HealtCheck |
|
|
SOFTURE.Common.Correlation
SOFTURE - Correlation |
|
|
SOFTURE.Common.Logging
SOFTURE - Logging |
|
|
SOFTURE.MessageBroker.Rabbit
SOFTURE - MessageBroker - Rabbit |
|
|
SOFTURE.Domain
SOFTURE - Domain |
This package is not used by any popular GitHub repositories.
See https://github.com/SOFTURE/COMMON/blob/master/CHANGELOG.md for release notes.