This is a migrated thread and some comments may be shown as answers.

How use Inner JOIN IN ORM2010

1 Answer 124 Views
OQL (OQL specific questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kunal
Top achievements
Rank 1
kunal asked on 09 Aug 2010, 09:33 AM
Hi

Following query  return me a list of record......

Select  ARM.ID,ARM.name from artist as A
INNER JOIN artist_role As AR ON AR.artist_id = A.id
INNER JOIN artist_role_master As ARM ON ARM.id = AR.artist_role_master_id

I want this Query in .net Using ORM2010

1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 10 Aug 2010, 08:43 AM
Hi kunal,

 The requested LINQ query should be defined in the following way:


var query =
    from artist in context.Artists
    join role in context.ArtistRoles on artist.Id equals role.ArtistId
    join master in context.ArtistRoleMaster on role.Id equals master.ArtistRoleMasterId
    select new { master.ID, master.Name };

Hope that helps.


Best wishes,
Damyan Bogoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
OQL (OQL specific questions)
Asked by
kunal
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or