mysql - Get a value going through several tables in entity framework? -


i have situation trying value stored in 1 table, have go through several other tables on same database correct result.

table 1 has pk id can query, pk give me new fk in table 2, give me key table 3 , table 3 give me key table 4 has value stored against pk in table 1. if made sense? can not tables or database, need find way select value in table 4 primary key got in table 1.

any ideas?

edit 1 :

i try explain better. have filepath located in table 4. correct filepath need first find project id in table 1. same project id fk in table 2. in table 2 need find id (let's call "customer id") using project id fk, customer id fk in table 3. in table 3 need find purchase id using customer id fk, purchase id fk in table 4. correct fk (purchase id) in table 4, able correct filepath. filepath coresponds project id table 1.

i using asp.net (entity framework) , sql database. thinking use linq, confused how it. join several tables or try filepath way?

did make more clear?

use linq join query,..

one example, see here entity framework join 3 tables

or search linq join in google,you can find solution yourself.


Comments

Popular posts from this blog

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -