Quantcast
Viewing latest article 2
Browse Latest Browse All 7

SQL Query in LINQ

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 latest article 2
Browse Latest Browse All 7

Trending Articles



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