title: C# EF ASP.NET Web API timeout - how can I call a long running query?
body: <p>I have a C# code that I want to execute. </p>
  
  <pre><code>  str = "SELECT u.LastName " +
                        ",COALESCE(COUNT(DISTINCT pc.PhraseId), 0) AS CreatedByQty " +
                        ", COALESCE(COUNT(DISTINCT pm.PhraseId), 0) AS ModifiedByQty " +
                        "FROM dbo.AspNetUsers u " +
                        "LEFT JOIN dbo.Phrase pc " +
                        "ON u.Id = pc.CreatedBy " +
                        "LEFT JOIN dbo.Phrase pm " +
                        "ON u.Id = pm.ModifiedBy " +
                        "GROUP BY u.LastName ";
                  threeColQuery = db.Database.SqlQuery&lt;threeCol&gt;(str);
                  threeColReport = await threeColQuery.ToListAsync();
                  return Ok(threeColReport);
  </code></pre>
  
  <p>I know from running the query in SQL Server manager that it takes about 30 seconds.  </p>
  
  <p>When running in a Web API Call I get this:</p>
  
  <pre><code>"innerException":{"message":"An error has occurred.","exceptionMessage":"The wait operation timed 
  </code></pre>
  
  <p>Is there a way I can allow a WebAPI call to run a long running query?</p>