Go to file
2021-06-16 23:06:27 -04:00
Demo added cors and added produces json. 2021-02-07 00:12:41 -05:00
PoweredSoft.CQRS Add project files. 2021-02-01 23:31:07 -05:00
PoweredSoft.CQRS.Abstractions GQL Authorization Middleware implemented, will take care of controllers next. 2021-02-04 21:00:24 -05:00
PoweredSoft.CQRS.AspNetCore added cors and added produces json. 2021-02-07 00:12:41 -05:00
PoweredSoft.CQRS.AspNetCore.Abstractions cqrs. 2021-02-02 12:19:59 -05:00
PoweredSoft.CQRS.AspNetCore.OData get support :) 2021-02-05 14:05:18 -05:00
PoweredSoft.CQRS.AspNetCore.OData.Abstractions OData support. :) 2021-02-05 13:06:34 -05:00
PoweredSoft.CQRS.DynamicQuery updated and added case insensitive support. 2021-04-27 14:08:39 -04:00
PoweredSoft.CQRS.DynamicQuery.Abstractions updated and added case insensitive support. 2021-04-27 14:08:39 -04:00
PoweredSoft.CQRS.DynamicQuery.AspNetCore updated and added case insensitive support. 2021-04-27 14:08:39 -04:00
PoweredSoft.CQRS.GraphQL.Abstractions graphql fluent validation implementation with middleware. 2021-02-03 20:28:56 -05:00
PoweredSoft.CQRS.GraphQL.DynamicQuery updated and added case insensitive support. 2021-04-27 14:08:39 -04:00
PoweredSoft.CQRS.GraphQL.FluentValidation graphql fluent validation implementation with middleware. 2021-02-03 20:28:56 -05:00
PoweredSoft.CQRS.GraphQL.HotChocolate mistake should of been a continue was a break. 2021-06-16 23:06:27 -04:00
PoweredSoft.CQRS.GraphQL.HotChocolate.DynamicQuery GQL Authorization Middleware implemented, will take care of controllers next. 2021-02-04 21:00:24 -05:00
.gitattributes Add .gitignore and .gitattributes. 2021-02-01 23:31:05 -05:00
.gitignore Add .gitignore and .gitattributes. 2021-02-01 23:31:05 -05:00
azure-pipeline.yaml Update azure-pipeline.yaml for Azure Pipelines 2021-02-07 00:25:20 -05:00
LICENSE Create LICENSE 2021-02-01 23:55:58 -05:00
PoweredSoft.CQRS.sln OData support. :) 2021-02-05 13:06:34 -05:00
README.md Update README.md 2021-02-02 12:42:44 -05:00

CQRS

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

Getting Started

Install nuget package to your awesome project.

Full Version NuGet NuGet Install
PoweredSoft.CQRS.Abstractions NuGet PM> Install-Package PoweredSoft.CQRS.Abstractions
PoweredSoft.CQRS NuGet PM> Install-Package PoweredSoft.CQRS
PoweredSoft.CQRS.AspNetCore.Abstractions NuGet PM> Install-Package PoweredSoft.CQRS.AspNetCore.Abstractions
PoweredSoft.CQRS.AspNetCore NuGet PM> Install-Package PoweredSoft.CQRS.AspNetCore

Sample of startup code for aspnetcore MVC

public void ConfigureServices(IServiceCollection services)
{
    // make sure to add your queries and commands before the .AddPoweredSoftQueries and .AddPoweredSoftCommands
    AddQueries(services);
    AddCommands(services);

    // adds the non related to aspnet core features.
    services.AddPoweredSoftCQRS();
    
    services
        .AddControllers()
        .AddPoweredSoftQueries() // adds queries to aspnetcore mvc.(you can make it configurable to load balance only commands on a instance)
        .AddPoweredSoftCommands() // 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>();
}