list issue
-
hi guys i have two tables tablea(PK) and tableb(FK) now i just want to load only data from tablea not from tableb but when i do var qry = from result in con.tablea select result; return qry.tolist() but it gives me also the data from tableb , althoug when i see the sql query from con.log i just see it getting data from table a , why is that? if the query is pointing to just tablea so why there are records from tableb? thanks.
Tauseef A Khan MCP Dotnet framework 2.0.
-
hi guys i have two tables tablea(PK) and tableb(FK) now i just want to load only data from tablea not from tableb but when i do var qry = from result in con.tablea select result; return qry.tolist() but it gives me also the data from tableb , althoug when i see the sql query from con.log i just see it getting data from table a , why is that? if the query is pointing to just tablea so why there are records from tableb? thanks.
Tauseef A Khan MCP Dotnet framework 2.0.
You only should get the foreign key of tableb! according to your example... unless you've selected some data of tableb like result.tableb.fieldOfTableB <--- this automatically makes a join in your query! ;)