isnull in linq where condition
Database
3
Posts
3
Posters
0
Views
1
Watching
-
Hi, How to write isnull(exp1,exp2) in the where condition of linq. eg; SQL: ... where userpk = isnull(@userpk,userpk) i need to convert the above query to linq Thankyou, Yesuprakash
-
Hi, How to write isnull(exp1,exp2) in the where condition of linq. eg; SQL: ... where userpk = isnull(@userpk,userpk) i need to convert the above query to linq Thankyou, Yesuprakash
http://forums.asp.net/t/1329095.aspx/1[^]
My advice is free, and you may get what you paid for.
-
Hi, How to write isnull(exp1,exp2) in the where condition of linq. eg; SQL: ... where userpk = isnull(@userpk,userpk) i need to convert the above query to linq Thankyou, Yesuprakash
This may help
where
!string.IsNullOrEmpty(record.Field("userpk"))
? record.Field("userpk")
: nullNiladri Biswas