Skip to content

pgermishuys/CQRSMicro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CQRSMicro

CQRSMicro Framework for Research Purposes

Getting Started

  1. The IMessageBus provides a contract for the transport mechanism for messages. Currently there is an implementation in the form of @abdullin's InMemoryBus.
  2. An AbstractApplicationService which you can inherit from and define methods on (in the form of public void When(YourCommand command)), that will handle commands.

e.g.

class Program
{
	static void Main(string[] args)
	{
		var messageBus = new InMemoryBus("Memory Bus");
		var applicationService = new AccountApplicationService();
		messageBus.Subscribe<CreateAccount>(applicationService);
		messageBus.PublishMessage(new CreateAccount());

		System.Console.ReadLine();
	}
}

public class CreateAccount : Command
{
	public CreateAccount()
	{

	}
}
public class AccountApplicationService : AbstractApplicationService
{
	public void When(CreateAccount createAccount)
	{
		System.Console.WriteLine("Called Create Account");
	}
}

About

CQRSMicro Framework for Research Purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages