mostalive 68b9657d62 Add per-type tables and Find to DbContext (yak: add-per-type-tables-and-find-to-dbcontext-engc)
Refactor DbContext to use per-type internal storage (Dictionary<Type, Collection>)
instead of a single flat List<DbBase>, mirroring EF Core's DbSet<T> pattern.

Changes:
- Replace _tracked List<DbBase> with _tables Dictionary<Type, Collection<DbBase>>
- Add Table<T>() generic helper for compile-time known types (Find<T>)
- Add TableFor(Type) non-generic helper for Attach where type is only known at runtime
- Add instance-level Find<T>(Predicate<T>) method on DbContext that searches only
  the per-type table for T (mirroring DbSet<T>.Find behavior)
- Keep Tracked { get } as a flattened view across all per-type tables (API compatible)
- IsTracked now walks all per-type tables
2026-09-14 20:56:27 +01:00
2026-09-12 15:54:00 +01:00
S
Description
exercise to refactor subclass to dto. also contains spike for extract method refactoring with Roslyn.
360 KiB
Languages
C# 97.2%
Shell 1.2%
Mermaid 1%
PowerShell 0.6%