gaepdit / air-web

Web application to collect and organize data for the Georgia Air Protection Branch
The Unlicense
0 stars 0 forks source link

Implement Work Entry EF repositories #90

Closed dougwaldron closed 1 month ago

dougwaldron commented 2 months ago

The Work Entries will need to implement entity type hierarchy mapping. Further reading:

dougwaldron commented 1 month ago

Good advice from the EF Core Inheritance docs:

In summary, TPH is usually fine for most applications, and is a good default for a wide range of scenarios, so don't add the complexity of TPC if you don't need it. Specifically, if your code will mostly query for entities of many types, such as writing queries against the base type, then lean towards TPH over TPC.

That being said, TPC is also a good mapping strategy to use when your code will mostly query for entities of a single leaf type and your benchmarks show an improvement compared with TPH.

Use TPT only if constrained to do so by external factors.

dougwaldron commented 1 month ago

TPH benefits from sparse columns: