I have this code that returns a single user:
return RetryWithExpression<User, User>(u => u.FirstOrDefault(x => x.UserEmail == userEmail));
I am trying to convert it so that It returns many users like this:
return RetryWithExpression<User, List<User>>(u => u.Select(x => x.sUserCity == cityId));
This does not compile and I get an error:
Cannot implicitly convert type 'System.Linq.IQueryable<bool>' to 'System.Collections.Generic.List<User>'. An explicit conversion exists (are you missing a cast?)
How do I return a List from this method?