I'm using the EF Core 3.1 + MySQL, and using this method for querying:
IQueryable<ApplicationUser> customers = from u in _context.Users where (u.Customer != null && u.IsActive) select u;
if (!String.IsNullOrEmpty(searchString))
{
customers = customers.Where(s => s.Email.Contains(searchString));
}
And I upgrade to using EF.Function.Like for better performance:
if (!String.IsNullOrEmpty(searchString))
{
customers = customers.Where(x => EF.Functions.Like(x.Email, $"%{searchString}%"));
}
But it is case-sensitive, how to make it case-insensitive?