Build queries dynamically with conditions.
How to build query on the basis of if-else conditions? I have tried doing it as below
But the where conditions don't seem to add and the result is returned without them.
But the where conditions don't seem to add and the result is returned without them.