I have a requirements where we are supposed to store all the key-value in one table. For example, status of application, status of user requests, status of incident etc. We don't want to create separate tables for each type of statuses.
Now, with one table containing all the keys, let's say another table stores user and it's request details that requires us to have two columns in userRequest table to have two keys. Not sure how to achieve this in EF core, code-first approach.
Also, we don't want to add any navigational properties in the key-value table as otherwise it will grow very huge in future.
I tried some online tutorials, but they seems very old and those solutions aren't working anymore.
Thanks.
CREATE TABLEstatements unless you aren't defining your FKs correctly and instead rely on EF to implicitly create those for you (which is always a bad idea) - but this is why Code-First is a bad idea for serious projects where the details of the design of the database matter. Is there a reason you can't (or won't) use a database-first approach (e.g. with SSDT) and use EF's scaffolding instead?