henkmollema / Dommel

CRUD operations with Dapper made simple.
MIT License
634 stars 100 forks source link

Parentheses missing when combining multiple where statements #302

Closed henkmollema closed 7 months ago

henkmollema commented 7 months ago
.Where(x => x == 1 || x == 2)
.AndWhere(x => x == 3 || x == 4)

generates

where x = 1 or x = 2 and (x = 3 or x = 4)

instead of

where (x = 1 or x = 2) and (x = 3 or x = 4)

This bug is introduced in #298