LINQ - EF join difficulty

apking

New Member
I have two tables:Phase :\[code\]long IDstring Name\[/code\]and another Activity :\[code\]long IDstring Namelong PhaseID\[/code\]I already know the name of the phases and I want to get the activity for those particular phases. Do i add PhaseName to the activity table or do I do it through join in LINQ?Maybe something like this?\[code\]var query = from a in entities.Activities join p in entities.Phases on a.PhaseId equals p.Id where p.Name == "Preplanning"\[/code\]... and here im not sure how to finish this query..Thanks for your help!
 
Back
Top