This repository showcases a simple Account management system using two different approaches: traditional CRUD operations and Event Sourcing. The solution is written in C# and uses an in-memory database for simplicity.
- BasicCrudExample: Demonstrates the use of conventional CRUD operations.
- BasicEventSourcingExample: Demonstrates the use of Event Sourcing techniques.
- .NET SDK
- Visual Studio or any C# compatible IDE
- Clone the repository:
git clone https://github.com/username/repo-name.git
- Open the solution in your preferred IDE.
- Set the desired project (
BasicCrudExample
orBasicEventSourcingExample
) as the startup project. - Run the project and step through the
Program.cs
file to see the implementation in action.
- Open an Account
- Deposit money into the Account
- Make withdrawals
- View the persisted state of the Account
- Open an Account
- Deposit money into the Account
- Make withdrawals
- View the persisted state of the Account
- View the full audit log of every event that occurred against the Account
For a detailed explanation of Event Sourcing and the code examples, check out my blog post: Let's Learn Event Sourcing
Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.