event-design
CommunityDesign robust event-sourced domain events
Software Engineering#csharp#microservices#event-driven#design-patterns#event-sourcing#ef-core#domain-events
AuthorFaysilAlshareef
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides a consistent, production-ready pattern for defining domain events in event-sourced .NET systems, preventing divergent event shapes, fragile serialization, and ordering mistakes that break replay and migration workflows.
Core Features & Use Cases
- Typed event hierarchy: guidance for an abstract Event base class, a generic Event<TData> wrapper, and immutable IEventData records to keep payloads explicit and versionable.
- Enum-based event identification: use EventType enum values to drive EF Core discriminators and avoid brittle string identifiers.
- Sequence and versioning: enforce sequence ordering and a Version field to support schema evolution and safe replays.
- Practical use case: implement OrderCreated, OrderUpdated, and collection-modification events, convert commands to events via extension methods, and register discriminator mappings in EF Core.
Quick Start
Create an Event<TData> subclass with its IEventData record, add the corresponding EventType enum value, convert your command to the event via an extension method, and register the concrete type in your EF Core discriminator mapping.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: event-design Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#event-design Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.