Longer LINQ Chaining Anyone have ideas on how to improve this code at all?

string user = User.Identity.GetUserId();

        IQueryable&lt;Article&gt; t =
            db.Articles.Include(a =&gt; a.Categories)
                .Include(b =&gt; b.Shared)
                .Where(s =&gt; s.Private &amp; s.createdby == User.Identity.Name);
        IQueryable&lt;Article&gt; q = db.Articles.Include(a =&gt; a.Shared).Where(s =&gt; s.Shared.Any(x =&gt; x.User == user));
        IQueryable&lt;Article&gt; art = t.Concat(q);
        IQueryable&lt;Category&gt; cat = db.Categories.Where(x =&gt; art.Any(c =&gt; c.categoryID == x.Id));


Especially looking to see if anyone has a fun way of putting all this into 1 query.
The first and most obvious improvement would be better variable naming:

IQueryable&lt;Article&gt; privateArticlesCreatedByUser =
    db.Articles.Include(article =&gt; article.Categories)
        .Include(article =&gt; article.Shared)
        .Where(article =&gt; article.Private &amp;&amp; article.createdby == User.Identity.Name);

IQueryable&lt;Article&gt; articlesSharedWithUser = 
    db.Articles.Include(article =&gt; article.Shared)
        .Where(sharedArticle =&gt; sharedArticle.Shared.Any(shareRecipient =&gt; shareRecipient.User == user));

IQueryable&lt;Article&gt; articlesCreatedByOrSharedWithUser = privateArticlesCreatedByUser.Concat(articlesSharedWithUser);

IQueryable&lt;Category&gt; categories = db.Categories
    .Where(category =&gt; articlesCreatedByOrSharedWithUser.Any(articleCategory =&gt; articleCategory.categoryID == category.Id));


Obviously these names may not perfectly align with what the data means (as they're basically educated guesses on my part), but already they're a lot easier for somebody else to understand.

I also changed your &amp; to an &amp;&amp;, since it then saves an equality check sometimes.

I also notice that you are including shared articles occurs twice. This might be too trivial an improvement and it's debatable if it will improve readability at all, but you could try this:

var sharedArticles = db.Articles.Include(article =&gt; article.Shared);

IQueryable&lt;Article&gt; privateArticlesCreatedByUser =
    sharedArticles.Include(article =&gt; article.Categories)
        .Where(article =&gt; article.Private &amp;&amp; article.createdby == User.Identity.Name);

IQueryable&lt;Article&gt; articlesSharedWithUser = sharedArticles
        .Where(sharedArticle =&gt; sharedArticle.Shared.Any(shareRecipient =&gt; shareRecipient.User == user));

IQueryable&lt;Article&gt; articlesCreatedByOrSharedWithUser = privateArticlesCreatedByUser.Concat(articlesSharedWithUser);

IQueryable&lt;Category&gt; categories = db.Categories
    .Where(category =&gt; articlesCreatedByOrSharedWithUser.Any(articleCategory =&gt; articleCategory.categoryID == category.Id));