Quantcast
Channel: SQL Query in LINQ
Viewing all articles
Browse latest Browse all 7

SQL Query in LINQ

$
0
0

Oh sorry, completely forgot to update the thread. It worked actually and it was all my mistake or I overlooked the concept myself.

Like mentioned in native SQL a condition should be " ((@IsPaid IS NOT NULL AND [IsPaid] = @IsPaid)OR @IsPaid IS NULL "

and in code I was using:  ((isPaid != null && t.IsPaid == isPaid) || t.IsPaid == null)) 

Error was in last condition after || where it says t.IsPaid it should had been ((isPaid != null && t.IsPaid == isPaid) || isPaid == null)) (i.e the supplied parameter). 

Hope its clear now :)


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>