How to use UNION(concat/union) in Entity Framework with one call?
<p>I need to do a UNION in Entity Framework but I need to do only one call to the DB. I know that I can use CONCAT/UNION but it calls the DB for each CONCAT/UNION, and thats not what I want. And I need to use TOP 4. It is too slow.</p>

<p>here is my example...</p>

<pre><code>using (var db = new ApplicationDbContext())
    {
         var query1 = "SELECT TOP 4 * FROM Products where CategoryID=1";
         var query2 = "SELECT TOP 4 * FROM Products where CategoryID=2";
         var query3 = "SELECT TOP 4 * FROM Products where CategoryID=3";
         IEnumerable&lt;Product&gt; p1 = db.Database.SqlQuery&lt;Product&gt;(query1);
         IEnumerable&lt;Product&gt; p2 = db.Database.SqlQuery&lt;Product&gt;(query2);
         IEnumerable&lt;Product&gt; p3 = db.Database.SqlQuery&lt;Product&gt;(query3);

         IEnumerable&lt;Feed&gt; all = p1.Union(p2).Union(p3);

        return all.ToList();
    }
</code></pre>

<p>how can I do a UNION with one call?</p>