Search code examples
asp.net-coreentity-framework-coreentity-framework-core-2.1

Can you create a 1-to-1 relationship between two query types?


Say I have two query types, they both have a key column (as it happens, I'm querying an SCCM database by its views) called ResourceID.

The way I read the documentation this may not be possible since a Query Type cannot be the principal end of a relationship.

Can anyone confirm/deny this?

I don't think specifics are required for this question, but if you feel they are I can add some.


Solution

  • Yes! You cannot create one-to-one between two query types because query type cannot be principal end of a relationship whereas in between one-to-one principal end of a relationship is a must.