OpenHarbor.CQRS.DynamicQuery 8.1.0-rc1

This is a prerelease version of OpenHarbor.CQRS.DynamicQuery.
dotnet add package OpenHarbor.CQRS.DynamicQuery --version 8.1.0-rc1                
NuGet\Install-Package OpenHarbor.CQRS.DynamicQuery -Version 8.1.0-rc1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenHarbor.CQRS.DynamicQuery" Version="8.1.0-rc1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OpenHarbor.CQRS.DynamicQuery --version 8.1.0-rc1                
#r "nuget: OpenHarbor.CQRS.DynamicQuery, 8.1.0-rc1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install OpenHarbor.CQRS.DynamicQuery as a Cake Addin
#addin nuget:?package=OpenHarbor.CQRS.DynamicQuery&version=8.1.0-rc1&prerelease

// Install OpenHarbor.CQRS.DynamicQuery as a Cake Tool
#tool nuget:?package=OpenHarbor.CQRS.DynamicQuery&version=8.1.0-rc1&prerelease                

This project was originally initiated by Powered Software Inc. and was forked from the PoweredSoft.CQRS Repository

CQRS

Our implementation of query and command responsibility segregation (CQRS).

Getting Started

Install nuget package to your awesome project.

Full Version NuGet NuGet Install
OpenHarbor.CQRS <a href="https://www.nuget.org/packages/OpenHarbor.CQRS/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS
OpenHarbor.CQRS.AspNetCore <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.AspNetCore/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.AspNetCore
OpenHarbor.CQRS.FluentValidation <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.FluentValidation/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.FluentValidation
OpenHarbor.CQRS.DynamicQuery <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.DynamicQuery/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.DynamicQuery
OpenHarbor.CQRS.DynamicQuery.AspNetCore <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.DynamicQuery.AspNetCore/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.DynamicQuery.AspNetCore

Abstractions Packages.

Full Version NuGet NuGet Install
OpenHarbor.CQRS.Abstractions <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.Abstractions/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.Abstractions
OpenHarbor.CQRS.AspNetCore.Abstractions <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.AspNetCore.Abstractions/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.AspNetCore.Abstractions
OpenHarbor.CQRS.DynamicQuery.Abstractions <a href="https://www.nuget.org/packages/OpenHarbor.CQRS.DynamicQuery.Abstractions/" target="_blank">NuGet</a> PM> Install-Package OpenHarbor.CQRS.AspNetCore.Abstractions

Sample of startup code for aspnetcore MVC

public void ConfigureServices(IServiceCollection services)
{
    // make sure to add your queries and commands before configuring MvCBuilder with .AddOpenHarborCommands and .AddOpenHarborQueries
    AddQueries(services);
    AddCommands(services);

    // adds the non related to aspnet core features.
    services.AddOpenHarborCQRS();
    
    services
        .AddControllers()
        .AddOpenHarborQueries() // adds queries to aspnetcore mvc.(you can make it configurable to load balance only commands on a instance)
        .AddOpenHarborCommands() // adds commands to aspnetcore mvc. (you can make it configurable to load balance only commands on a instance)
        .AddFluentValidation();

    services.AddSwaggerGen();
}

Example how to add your queries and commands.

private void AddCommands(IServiceCollection services)
{
    services.AddCommand<CreatePersonCommand, CreatePersonCommandHandler>();
    services.AddTransient<IValidator<CreatePersonCommand>, CreatePersonCommandValidator>();

    services.AddCommand<EchoCommand, string, EchoCommandHandler>();
    services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();
}

private void AddQueries(IServiceCollection services)
{
    services.AddQuery<PersonQuery, IQueryable<Person>, PersonQueryHandler>();
}

Fluent Validation

We use fluent validation in all of our projects, but we don't want it to be enforced.

If you install OpenHarbor.CQRS.FluentValidation you can use this way of registrating your commands.

public void ConfigureServices(IServiceCollection services) 
{
    // without Package.
    services.AddCommand<EchoCommand, string, EchoCommandHandler>();
    services.AddTransient<IValidator<EchoCommand>, EchoCommandValidator>();
}

public void ConfigureServices(IServiceCollection services) 
{
    // with OpenHarbor.CQRS.FluentValidation package.
    services.AddCommand<EchoCommand, string, EchoCommandHandler, EchoCommandValidator>();
}

2024 Roadmap

Task Description Status
Support .NET 8 Ensure compatibility with .NET 8.
Create a new demo project as an example Develop a new demo project to serve as an example for users. ⬜️
New Independent Module for MVC Develop a standalone module, independent of MVC, to enhance framework flexibility. ⬜️
Implement .NET Native Compilation (AOT) Enable Ahead-of-Time (AOT) compilation support for .NET 8. ⬜️
Update FluentValidation Upgrade FluentValidation to the latest version, addressing potential breaking changes. ⬜️
Create a website for the Framework Develop a website to host comprehensive documentation for the framework. ⬜️
Re-add support for GraphQL Re-integrate support for GraphQL, exploring lightweight solutions. ⬜️
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OpenHarbor.CQRS.DynamicQuery:

Package Downloads
OpenHarbor.CQRS.DynamicQuery.AspNetCore

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
8.1.0-rc1 46 12/22/2024
8.0.0-preview.6 138 9/2/2024
8.0.0-preview.5 205 11/4/2023