I'm using LinqPad to query a MySQL MyISAM database. There are foreign keys, but no constraints on them, so LinqPad can't pick up the relationship. I'd like to add these relationships (tell it which fields are FKs) to make querying easier. Is this possible?
There's no way to do this other than adding the foreign key constraints. (As a matter of interest, what's the reason for not having foreign key constraints?)
If there aren't FKs set up, then you only have one option.
You must join your tables manually using LINQ.
If you really want to use dot-notation, I think you can change your statement type to "C# Program" and put the LINQ in an extension method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With