Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

nullable parameter in linq with && operator . How?

$
0
0
fuction void GetBookingSearchCoures(SearchBookingResponse model, int userId, string language, int? _personId = null)
bookingSearches = from uc in _dataContext.V_ENT_BOOKINGS where uc.USER_ID == userId && uc.LANGUAGE_CODE == language && uc.FROMDATE > todaysDateTime
// here i am trying to append the && with (if not null _personId) //else append the _personId)

How can i do that


Viewing all articles
Browse latest Browse all 1698

Trending Articles



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