Mike

My feedback

  1. 865 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Mike commented  · 

    You may be able to workaround this by flipping around your query for Linq to Entities, then flipping it back with Linq to Objects. Using the example above:

    var q = context.Products.Where(p => p.UnitPrice > 20 & p.Category.StartsWith("a")).Include(p => p.Category);

    var r = q.ToList().Select(p => p.Category).Distinct();

    Note: This would not work if you are expecting Categories that don't have products in your results.

    Mike supported this idea  · 
  2. 101 votes
    Sign in
    (thinking…)
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Mike supported this idea  · 

Feedback and Knowledge Base