Linq Query: InvalidOperationException: The relationship ... because it is not compatible. Configure
I have a database. This database schema is in use for various apps among others .net core apps with EF core
I had a problem with a Linq Query so I thought I'd try to play with this in Linqpad, however:
- I make a new entity framework core connection in LinqPad
- Release 5.0.7
Then ... any query complains about an invalid FK
- I have a table which has a PK of (int, string, int)
- another table references this with FK int, string, nullable(int) .
I think it complains about the nullable FK key and that this is an incompatible foreign key. So I assume that when you run "any query" it does some validation on the schema overall to start with.
How do I solve this? (it is impossible to change the schema of the database)