I have got a query which returns True or False, depending on the criteria set in the query:
bool eventVoucherUsed = getAllBookings.Any(r => r.EventID == booking.EventID && r.Voucher != null) ? true : false;
I want to modify the above query by adding one more check:
booking.VoucherStatus == True
But I can’t use the And operator three times. Is there any other alternative to achieve this?
I’m not sure what you mean by “cant use And operator three times”. All that you need to do is add the condition to your predicate.