title: Alternative to Task.Run
body: <p>I have an ASP.NET MVC 4 program and I wrote the following code where I wanted to make the Results() method async:</p>
  
  <pre><code>public async Task&lt;ActionResult&gt; Results()
  {
    var result1 = SomeMethodAsync(1);
    var result2 = SomeMethodAsync(2);
    var result3 = SomeMethodAsync(3);
  
    await Task.WhenAll(result1, result2, result3);
  
    ViewBag.Result1 = result1;
    ViewBag.Result2 = result2;
    ViewBag.Result3 = result3;
  
    return View()
  
  }
  
  
  public async Task&lt;int&gt; SomeMethodAsync(int i)
  {
    //do some logic
  
    //make db call
    return await Task.Run( () =&gt; DbCall(i));
   }
  
  
   public int DbCall(i)
   {
     //make db call
  
     return valueFromDb;
   }
  </code></pre>
  
  <p>Since I am not using Entityframework 6 I cannot make the DbCall() async. <a href="http://blog.stephencleary.com/2013/11/taskrun-etiquette-examples-dont-use.html" rel="nofollow">I was reading</a> that its not a good idea to use Task.Run in ASP.NET projects since Task.Run will borrow a thread from the ASP.Net thread pool and therefore can cause queuing issues with large number of requests (as there will be lower number of available threads for processing incoming requests). </p>
  
  <p>1) How can I make my method async without using Task.Run?</p>
  
  <p>2) Is it better to make the method synchronous than using Task.Run ?</p>