Click here to Skip to main content
15,904,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have a linq query that I need to convert to its sql equivlent.
C#
var listItems = from r in EntityContext.Context.RateList
                               where r.RatingTypeId == RatingtypeId
                               && r.RateList2.RateListId == iParentRateListId
                               select new
                               {
                                   r.RateListId,
                                   r.RateListName
                               };

Just dont understand what the && r.RateList2 is doing here.
Thanks in advance.
Posted

1 solution

understand what the && r.RateList2 is doing here

&& -> Adding multiple condition to WHERE clause
r.RateList2 -> looks like r object has such implementation. It's a property exposed to be used.
 
Share this answer
 
Comments
VJ Reddy 30-Apr-12 8:29am    
To the point. 5!
Sandeep Mewara 30-Apr-12 8:55am    
Thanks.
Mohamed Mitwalli 30-Apr-12 8:37am    
5+
Sandeep Mewara 30-Apr-12 8:55am    
:)
frostcox 30-Apr-12 9:40am    
Ok just so I understand, there is no column on the table called RateList2 but there are two foregin key columns present. Is the RateList2 refrencing one of those columns?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900