EF Core 10 natively supports adding, removing, and querying immutable entities with ImmutableList collections, but updating them requires a custom wrapper. A thin library (under 300 lines) enables deep immutability tracking by detaching original entities, attaching modified ones, and recursively resolving navigation properties. The solution uses documented EF Core features like change tracker manipulation and init-only setters to maintain immutable design patterns while persisting complex object graphs with nested collections.

โ€ข13m watch time

Sort: