LINQ entre o operador

O seguinte funciona bem com tipos IEnumerable, mas existe alguma maneira de obter algo assim trabalhando com tipos IQueryable contra um banco de dados sql?

class Program
{
    static void Main(string[] args)
    {
        var items = new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, };

        foreach (var item in items.Where(i => i.Between(2, 6)))
            Console.WriteLine(item);
    }
}

static class Ext
{
   public static bool Between<T>(this T source, T low, T high) where T : IComparable
   {
       return source.CompareTo(low) >= 0 && source.CompareTo(high) <= 0;
   }
}

questionAnswers(1)

yourAnswerToTheQuestion