title: VB.Net Async using Await properly
body: <p>I'm using VB.Net, MVC 5, Visual Studio 2013.  I have a question <a href="https://codereview.stackexchange.com/questions/106363/mvc-net-view-model">here</a> on code review, in which it was suggested I make some of my view model functions asynchronous.  I am trying to implement this suggestion.</p>
  
  <p>I have a method in my view model which is called by an action (this portion seems to be working well): </p>
  
  <pre><code>Async Function getItemHistory(itemID As Integer, itemTypeID As Integer) As Threading.Tasks.Task(Of ItemHistoryPresentationModel)
      Dim returnModel = New ItemHistoryPresentationModel
  
      Dim getOperatorsTask As Task(Of List(Of String)) = getOperatorsAsync(itemID)
      Dim getItemNameTask As Task(Of String) = getItemNameAsync(itemTypeID)
  
      Await Task.WhenAll(getOperatorsTask, getItemNameTask)
  
      returnModel.ItemTypeString = getItemNameTask.Result
      returnModel.Operators = getOperatorsTask.Result
  
      Return returnModel
  End Function
  </code></pre>
  
  <p>The problem I'm encountering is in my <code>getItemNameAsync</code> and <code>getOperatorsAsync</code>:</p>
  
  <pre><code>Async Function getItemNameAsync(itemTypeID As Integer) As Task(Of String)
      Dim itemName = (From row In db.tblCategories
                      Where row.Item_Type_Identifier = itemTypeID
                      Select row.Item_Type).SingleOrDefault()
  
      Return itemName
  End Function
  </code></pre>
  
  <p>This function gives me a warning:</p>
  
  <blockquote>
    <p>This async method lacks 'Await' operators and so will run synchronously.  Consider using the 'Await' operator to await non-blocking API calls, or 'Await Task.Run(...)' to do CPU-bound work on a background thread.</p>
  </blockquote>
  
  <p>I was under the impression that the <code>Await</code> in <code>getItemHistory</code> would take care of this issue for me.  </p>
  
  <p>What is the proper way to get rid of this warning?</p>