Best way to model different options in EF Core
I have a class that's used to define the integration parameters for a particular process. Now, I have integration options A,B,C, etc each of which correspond to different tables with different IDs I need to populate on my class.
ex
Now, only 1 integration is supported for each instance of
myclass
. I could in theory define each available integration's FK references in this table, but there must be a better way to do this?
3 Replies
either you use you discriminator and a flat type witih all the FKs, or you make myClass three types each with its own FK
probably the two simplest roads
I was thinking of keeping the bottom half, but modified a little.
I don't expect to have that many integrations, but with the other params required, it doesn't make sense to have a version of the class for each type. Makes more sense to use a type to determine the integration and reference the proper FK
wait, do all integrations have the same fields?