title: Cannot see FirstOrDefault
body: <p>Any Help is much appreciated guys!</p>
  
  <p>under GetProductByID, i am getting an error saying "int does not contain a definition for FirstOrDefault".</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using HomebaseSystemNew.Models;
  
  namespace HomebaseSystemNew.Controllers
    {
      public class ProductRepository
     {
  
      public ProductsController GetProductID(int Pid)
          {
            Product db = new Product();
  
            return db.Pid.FirstOrDefault(db =&gt; db.Pid == Pid);
          }
  
  
     }
  
  
  
  
     }
  </code></pre>