I have the code like below:
string x="Hyderabad";
var result=(from pr in db.Properties
join slp in ShortListProp on pr.PropertyId equals slp.PropertyId into gj
from dta in gj.DefaultIfEmpty()
where pr.City == x
select pr)
I want to pass pr.city==x dynamically.
string x="Hyderabad";
var query=pr.city==x;
var result=(from pr in db.Properties
join slp in ShortListProp on pr.PropertyId equals slp.PropertyId into gj
from dta in gj.DefaultIfEmpty()
where (query)
select pr)
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Karthik ChintalaPosted Jul 9, 2018, 9:20 AM
samba sivaPosted Jan 24, 2018, 9:08 AM
Rupesh KahanePosted Jan 23, 2018, 12:03 PM
samba sivaPosted Jan 23, 2018, 11:46 AM
Rupesh KahanePosted Jan 23, 2018, 11:38 AM
http://www.c-sharpcorner.com/article/how-to-use-joins-group-by-clause-in-entity-framework-with-linq-c-sharp/