title: LINQ Gernic List VB.NET
body: <p>I am trying to create a domain model using a product class entity an Abstract repository and a fake repository with sample data.</p>
  
  <p>I have created the following product class</p>
  
  <pre><code>Namespace Entities
  Public Class Product
      Dim _ProductID As Integer
      Dim _Name As String
      Dim _Description As String
      Dim _Price As Decimal
      Dim _Category As String
      Public Property ProductID() As Integer
          Get
              Return _ProductID
          End Get
          Set(ByVal value As Integer)
              _ProductID = value
          End Set
      End Property
  
      Public Property Name() As String
          Get
              Return _Name
          End Get
          Set(ByVal value As String)
              _Name = value
          End Set
      End Property
  
      Public Property Description() As String
          Get
              Return _Description
          End Get
          Set(ByVal value As String)
              _Description = value
          End Set
      End Property
  
      Public Property Price() As Decimal
          Get
              Return _Price
          End Get
          Set(ByVal value As Decimal)
              _Price = value
          End Set
      End Property
  
      Public Property Category() As String
          Get
              Return _Category
          End Get
          Set(ByVal value As String)
              _Category = value
          End Set
      End Property
  End Class
  End Namespace
  </code></pre>
  
  <p>And the following interface:</p>
  
  <pre><code>Namespace Abstract
  Public Interface IProductsRepository
      ReadOnly Property Products() As IQueryable(Of Product)
  End Interface
  End Namespace
  </code></pre>
  
  <p>I now need to create data using a generic LINQ list however I am stuck, this is what I have so far but I cannot add items:</p>
  
  <pre><code>Imports DomainModel.Abstract
  Imports DomainModel.Entities
  
  Namespace Concrete
  Public Class FakeProductsRepository
      Implements IProductsRepository
      Private Shared fakeProducts As IQueryable(Of Product) = New List(Of Product)().AsQueryable
  
      Public ReadOnly Property Products() As System.Linq.IQueryable(Of Entities.Product) Implements Abstract.IProductsRepository.Products
          Get
              Return fakeProducts
          End Get
      End Property
  
  End Class
  End Namespace
  </code></pre>
  
  <p>Sample Item:</p>
  
  <pre><code>fakeProducts.Add(New Product() With {.Name = "Football", .Price = 25})
  </code></pre>
  
  <p>Help is greatly appriciated..</p>