Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
Generic parameter for Linq where clause
samba siva
Jan 23 2018 11:07 AM
164
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)
Reply
Upload Source Code
Select only zip and rar file.
Post
Reset
Answers (
4
)
ASP.Net MVC and using Linq to Sql
What new in TS5