{"id":15003371,"url":"https://github.com/dario-l/ses","last_synced_at":"2025-10-03T14:31:14.815Z","repository":{"id":60773451,"uuid":"64379125","full_name":"dario-l/ses","owner":"dario-l","description":"SimpleEventStore is a simple event store library for .NET based on rdbms persistance.","archived":true,"fork":false,"pushed_at":"2020-06-24T12:26:50.000Z","size":1456,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T01:18:36.355Z","etag":null,"topics":["cqrs","cqrs-es","event-sourcing","event-store","event-stream","ms-sql-server","rdbms","sql","streams"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dario-l.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-28T08:45:47.000Z","updated_at":"2023-01-28T10:40:46.000Z","dependencies_parsed_at":"2022-10-04T15:27:05.674Z","dependency_job_id":null,"html_url":"https://github.com/dario-l/ses","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-l%2Fses","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-l%2Fses/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-l%2Fses/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dario-l%2Fses/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dario-l","download_url":"https://codeload.github.com/dario-l/ses/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235146427,"owners_count":18943261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cqrs","cqrs-es","event-sourcing","event-store","event-stream","ms-sql-server","rdbms","sql","streams"],"created_at":"2024-09-24T18:58:08.790Z","updated_at":"2025-10-03T14:31:09.187Z","avatar_url":"https://github.com/dario-l.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Ses is dead. Long live https://github.com/getmanta/manta **\n*...but is still used in production code.*\n\n# SimpleEventStore\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore) SimpleEventStore\n\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore.Abstracts) SimpleEventStore.Abstracts\n\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore.Domain) SimpleEventStore.Domain\n\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore.MsSql) SimpleEventStore.MsSql\n\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore.Subscriptions) SimpleEventStore.Subscriptions\n\n![SimpleEventStore](https://img.shields.io/nuget/v/SimpleEventStore.Subscriptions.MsSql) SimpleEventStore.Subscriptions.MsSql\n\nSimpleEventStore is a simple event store library for .NET based on rdbms persistance.\n\n##### Main goals\n\n - Async all the way down (sync methods also available)\n - No external dependencies\n - Pluggable persistance storage\n - Support optimistic (and pesimistic for special cases) concurrency with conflict resolver mechanism\n - Support any kind of serialization through ISerializer interface\n - Support any kind of loggers through ILogger interface\n - Support up-conversion of events/snapshots to the newest version\n - Subscriptions to one or many event stream sources for processmanagers/projections/others (with pluggable stream pollers)\n - Built-in implementation for: MS SQL Server, InMemory\n - Built-in single-writer pattern for MS SQL Server implementation (Linearizer)\n\n\n##### Basic example of usage\n\n``` c#\nvar options = new TransactionOptions {IsolationLevel = IsolationLevel.ReadCommitted};\nusing (var scope = new TransactionScope(TransactionScopeOption.RequiresNew, options, TransactionScopeAsyncFlowOption.Enabled))\n{\n    var aggregate = new ShoppingCart();\n    aggregate.AddItem(SequentalGuid.NewGuid(), name: \"Product 1\", quantity: 3);\n\n\n    var stream = new EventStream(id, aggregate.TakeUncommittedEvents());\n\n    // Adding metadata item (key, value)\n    stream.Metadata = new Dictionary\u003cstring, object\u003e\n    {\n        { \"RequestIP\", \"0.0.0.0\" },\n        { \"User\", \"John Doe\" }\n    };\n\n    var expectedVersion = aggregate.CommittedVersion + stream.Events.Count;\n    await _store.SaveChangesAsync(aggregate.Id, expectedVersion, stream);\n\n    scope.Complete();\n}\n```\n\nUsing repository pattern:\n``` c#\n// Usually transaction scope will be hidden somewhere in infrastructural part of code\nusing (var scope = new TransactionScope(TransactionScopeOption.RequiresNew, options, TransactionScopeAsyncFlowOption.Enabled))\n{\n    using (var repo = new SourcedRepo\u003cShoppingCart\u003e(store))\n    {\n        // Open stream and restore aggregate from history\n        var aggregate = await repo.LoadAsync(id);\n\n        aggregate.AddItem(Guid.NewGuid(), \"Product 1\", 3);\n\n        await repo.SaveChangesAsync(aggregate);\n    }\n    scope.Complete();\n}\n```\n\n##### It is working on production already\n\nSimpleEventStore has used in commercial project https://timeharmony.pl already.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdario-l%2Fses","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdario-l%2Fses","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdario-l%2Fses/lists"}