-
Notifications
You must be signed in to change notification settings - Fork 2
Home
EventSourced is an open-source .NET library for building projects based on Domain Driven Design principles in combination with Event Sourcing pattern.
The library is hosted on NuGet repository and can be added to your project by simply referencing it. Depending on the storage option of your choosing you can use Entity Framework based package (EventSourced.Persistence.EntityFramework
) or in-memory based store (EventSourced.Persistence.InMemory
package). You can use both approaches in one project simply by registering both of them.
After you are done installing the package you can simply add it to your projects Startup.cs
files by registering its services in ServiceCollection
.
Following example setups EventSourced library with EntityFramework used for preserving events and snapshots and with in-memory based projection store:
services.AddEventSourced(options => options.AddEntityFrameworkSupport(o => o.UseSqlServer(Configuration.GetConnectionString("EventStore")))
.UseEntityFrameworkEventStore()
.UseInMemoryProjectionStore()
.UseEntityFrameworkSnapshotStore())
To learn more about using the Event Sourced library continue to these sections: