Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.16 KB

index.md

File metadata and controls

40 lines (31 loc) · 1.16 KB
layout
frontpage

EventFlow is a easy to use async/await first CQRS+ES framework for the Microsoft .NET platform.

View documentation at https://docs.geteventflow.net/.

{% highlight csharp %} using (var resolver = EventFlowOptions.New .AddEvents(typeof (TestAggregate).Assembly) .AddCommandHandlers(typeof (TestAggregate).Assembly) .UseInMemoryReadStoreFor<TestAggregate, TestReadModel>() .CreateResolver()) { var commandBus = resolver.Resolve(); var eventStore = resolver.Resolve(); var readModelStore = resolver.Resolve<IInMemoryReadModelStore< TestAggregate, TestReadModel>>(); var id = TestId.New;

// Publish a command await commandBus.PublishAsync(new PingCommand(id));

// Load aggregate var testAggregate = await eventStore.LoadAggregateAsync(id);

// Get read model from in-memory read store var testReadModel = await readModelStore.GetAsync(id); } {% endhighlight %}

View the GitHub project page at https://github.com/eventflow/EventFlow for more information.