When using Blazor WebAssembly, be default, three projects are created - Client, Server and Shared. Which project is the best choice for code which defines EF Core data model?
- If I put it in Server, I have to create it's client counterpart in the Client project, which creates redundant code
- If I put it in Shared and use Data Annotations, the client becomes transitively dependent on EF Core
- If I put it in Shared and use Fluent API, I'll have to check multiple files to understand even a single property (e.g. is this property required? what is it's max length?)
It seems like I'm picking the lesser of three evils, which seems to be the Fluent API. Are there any other aspects that I didn't consider?