title: Cannot assign a void to an implicitly-typed local variable using Entity Framework 6
body: <p>I am using a <strong>WCF refrence</strong> to call the last row from my <code>Quote</code> table. Now I wrote this method in my WCF application to get the last row, but I do not know it it works or not(I am trying to test it):</p>
  
  <pre><code>public void GetLastQuote()
  {
      using (TruckDb db = new TruckDb())
      {
          var quote = (from qData in db.Quotes
                       where qData.Id == qData.RepresetativeId
                       orderby qData.Id descending
                       select qData).First();
      }
  }
  </code></pre>
  
  <p>In my WPF application I am using the WCF reference and calling on the <code>GetLastQuoteAsync()</code> method, but it is giving me the following error:</p>
  
  <blockquote>
    <p>Cannot assign void to an implicitly-typed local variable</p>
  </blockquote>
  
  <p>And here is the method in my WPF application where I am trying to call the <code>GetLastQuoteAsync()</code> reference.</p>
  
  <pre><code>private async void wListOfBills_Loaded(object sender, RoutedEventArgs e)
  {
      using (TruckServiceClient client = new TruckServiceClient())
      {
          var quote = await client.GetLastQuoteAsync(); // -&gt; This is where the error lies.
          var bills = await client.GetListOfBillsAsync(quote.Item.Id);
          if (bills == null)
          {
              dgFloor.IsEnabled = true;
              return;
          }
          dgFloor.ItemsSource = bills.Select(x =&gt; new ListOfBillsView
          {
              Code = x.StockCode,
              Group = x.GroupName,
              Description = x.StockDescription,
              Qty = x.Quantity,
              Length = x.Length,
              Width = x.Width,
              Weight = x.Weight,
              Price_m = x.PricePerMeter,
              Cost = x.Cost,
              Section = x.TruckSection.ToString()
          }).ToList();
      }
  }
  </code></pre>
  
  <p>I have seen some people with the same question, but I do not fully understand how to implement the solutions in my own problem. If anyone could help, I would appreciate it allot! :)</p>