30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • Getting Started: Event Sourcing in .NET

    Get started with Event Sourcing in .NET

    About This Course

    Event Sourcing is a persistence design pattern. It is often mentioned alongside CQRS and DDD. In short, it is the practice of storing the events that lead up to the current state instead of storing the state itself, as one would do in a CRUD system with a normalized database. The assumption is that it is always possible to re-create the state from the events, but not the other way around. Especially when Event Sourcing is combined with CQRS architecture, it enables a whole new way of thinking about data in your applications. It enables point-in-time data and the possibility to process old events against new features retroactively. In this course, the Event Sourcing principles and patterns are introduced, and we build an entire CQRS application from scratch to demonstrate how things piece together. We are not using a ready-made framework for this, but we are trying to take away the magic by building our own. At the end of this course, you should be familiar with event sourcing and how it fits with CQRS architecture.

    Course Curriculum

    4h 1m 8 sections
    Welcome
    00:50 Free preview
    What will you learn in this course?
    01:10 Free preview
    Who is the course for and prerequisites
    01:39 Free preview
    What is Event Sourcing?
    06:05
    Commands vs Events
    03:39
    Future, Present & Past
    07:03
    The relationship with DDD
    03:37
    Events, streams & aggregates
    04:49
    The command handler life cycle
    04:03
    CQRS architecture
    06:42
    Section recap
    00:50
    Introduction to our domain
    06:33
    Modelling Events & Commands
    08:52
    Value Types in commands & events
    14:21
    Making root entities
    05:16
    Building Command Handlers
    19:23
    Adding a Command Router
    07:29
    An exercise for you to make
    01:49
    Section recap
    00:40
    Introduction to the test base class
    06:13
    Writing event sourced tests
    05:17
    Making our tests more read readable
    08:24
    Another exercice
    00:56
    Section recap
    00:42
    What are we going to build?
    02:32
    A look at our starting point
    06:24
    Building a simple event store
    08:54
    Building a command API
    04:10
    Alternate API approaches
    03:47
    Finalizing & running our API
    06:19
    Exercise time again!
    00:27
    Section recap
    00:40
    Checking out the read API
    07:06
    Querying aggregate data
    03:35
    Building a projection system
    29:38
    Exercise
    02:28
    Section recap
    00:42
    The typical UI pattern
    04:06
    Introducing the SignalR Hub
    06:41
    Publishing our events over SignalR
    09:48
    A final exercise
    00:45
    Section recap
    01:18
    What can our system now do?
    09:48
    Beyond this course
    04:03
    Conclusion
    00:55

    Meet Your Instructor

    Hannes Lowette

    Hannes Lowette

    With 20 years in .NET development, Hannes has always been passionate about performance, databases, distributed systems and large-scale applications. When it comes to architecture, his opinions have become a bit more nuanced, and the "it depends" card, however boring, gets played in many technical discussions. Hannes has always had a passion for sharing knowledge. It doesn't matter whether it is one-to-one while pair programming, on a conference stage giving a talk or when he's helping people succeed in their careers as a coach. In his free time, when he's not building LEGO® castles with his three kids, he likes to stream his guitar building on Twitch and spends too much time playing online chess and doing all-around geeky stuff. You can always lure him into a chat over a glass of great Whisky.

    View all courses by Hannes Lowette

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#