title: ASP.Net Controller Action return only after task completion
body: <pre><code> public ActionResult Favorites()
      {
          var favs = new List&lt;Article&gt;();
          var tFavs = new Task(() =&gt;
          {
              favs = _favorites.GetFavorites(_currentUserId).ToList();
          });
          tFavs.Start();
          if (tFavs.IsCompleted)
          {
              ViewBag.Content = favs;
          }
          return View();
      }
  </code></pre>
  
  <p>In the code above, how can I ensure that return View is only called after the task is complete? Currently it throws an error on the view because ViewBag.Content is null.</p>