title: LINQ - Putting result in a dictionary(Of String, Integer), where the integer must be 0
body: <p>I have a LINQ2Entity problem, I want to get the value, string, from a database, so I select <code>FProducts.Serial_number</code>, and to end the query, I do <code>.ToDictionary</code>. </p>
  
  <p>The problem is, it tells me that it doesn't have sufficient parameters, to convert <code>ToDictionary</code>. </p>
  
  <p>So I need something like select <code>FProducts.Serial_number, Nothing). ToDictionary</code>.
  Also <code>FProducts.Serial_number, 0).ToDictionary</code> doesn't work.</p>
  
  <p>Any recommendations?</p>
  
  <pre><code>Sub GetStatistics(ByVal ProductNumbers As List(Of String), ByRef Passed As Integer, ByRef FailedProducts As List(Of String))
          Passed = 0
          FailedProducts = Nothing
          Dim tpDictionary As Dictionary(Of String, Integer)
          For Each productNumber As String In ProductNumbers
              Using context As New SelmaEntities
                  Dim Table = (From GoodProducts In context.TestResults
                              Where (GoodProducts.Art_no = productNumber)
                              Select GoodProducts.Art_no, GoodProducts.Failed)
                  tpDictionary = (From FProducts In context.TestResults
                              Where (FProducts.Art_no = productNumber And FProducts.Failed &lt;&gt; 0)
                              Order By FProducts.Serial_number
                              Select FProducts.Serial_number, ).ToDictionary
  
              End Using
          Next
      End Sub
  </code></pre>