Skip to content

goiarlabs/goiar-simple-cqrs

Repository files navigation

Goiar simple Cqrs

How to use it

Simple implemantation with log event handler

First you have to set up your application, so in the startup.cs add

public class Startup 
{
    //...
    public void ConfigureServices(IServiceCollection services)
    {
        //...
        services.AddCommandHandlersFromAssemblyOf(typeof(ACommandHandlerPivotClass));
        
        services.AddQueryHandlersFromAssemblyOf(typeof(AQueryHandlerPivotClass));
        //...
    }
    //...
}

This two lines will search for every implementation of IQueryHandler<>, ICommandHandler<> and ICommandHandler<,> on the assembly where the given class is Created. You can use these two lines as many times as you want.

You should create a ICommand

About

Cqrs enrouter library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages