Missing parentheses in a where clause with EF Core and IsNullOrWhiteSpace

Missing parentheses in a where clause with EF Core and IsNullOrWhiteSpace

Hi,

With EF Core I have a parentheses issue with this kind of code :
  1. _context.MyModels.Where(m => string.IsNullOrWhiteSpace(m.Name) &&  m.Id > 1)
When using IsNullOrWhiteSpace, the generated SQL does not encapsulate correctly with parentheses, which looks like this :

  1. SELECT * from model WHERE name is null OR TRIM(name) = '' AND id > 1
Looks like the issue is specific to using IsNullOrWhiteSpace. When using IsNullOrEmpty it adds parentheses around.

Regards,
Julien