you must use this method to remove the boolean condition and reduce the code
if you need to check the bool condition in Ef
1.For True Condition db.Customer.Where (p => p.customer_active) .select (m => m) .tolist (); 1.For the false state db.Customer.Where (p =>! P.customer_active) .select (m => m) .tolist ();
for suggestion only
source share