I have these entities:
Account
-IdAccount: 1
-Money: 20
-IdInfo: 2
Navigation Property: Info
Info
-IdInfo: 2
-Info: hi
Navigation Property: Account
When I do something like this using linq
var account = storeDB.Accounts.Include("Info").Single( a => a.IdInfo == 2 );
This will do a join with IdAccount=1 and IdInfo= 1, instead of 2. Does anybody know a different way I can do a query? I looked at select from bla bla, but I dont know how to put that in an object, since I created an Account.cs, and Info.cs like the ASP MVC3 tutorial of music.
I have a feeling it does some sort of natural join and that's why it associates both Ids with number 1.
I have been checking this for a lot of hours, and haven't been able to resolve this, any help will be greatly appreciated!