title: MVC Progress Bar while loading DB data in HomeController() before Index ActionResult is hit C#
body: <p>I have HomeController which loads data to model from SQL DB. </p>
  
  <p>Before the:</p>
  
  <pre><code>public ActionResult Index()
      {
          return View(_homePageViewModel);
      }
  </code></pre>
  
  <p>is hit, the data is loaded to </p>
  
  <blockquote>
    <p>_homePageViewModel </p>
  </blockquote>
  
  <p>and when it is ready the Razor Page is being loaded.</p>
  
  <p>I have managed to show Loading GIF while Razor Page's content is being loaded, but there is some time before it that nothing is shown, it's when the HomeController's main constructor loads data from DB.</p>
  
  <p>I need to show progress bar that will go from 0% to 100% while loading data from the DB.</p>
  
  <p>I don't know how to achieve as the Index Page is not loaded yet.</p>
  
  <p>Do I need to load loader page before the Index is rendered? Just to cover the time HomeController finishes it's work?</p>