How to declare select entity data type in Entity Framework?
<pre><code>    Dim itemList    

    itemList = From items In Context.Product
               Select New With {Key .Code = items.ITEM_CODE_, Key .Name = items.ITEM_NAME, Key .Eancode = items.EANCODE}    

    Dim sortList = itemList.Where(Function(u) u.Name.Contains("soap"))
</code></pre>

<p>When I execute last line, I am getting an error:</p>

<blockquote>
  <p>"Method invocation failed because 'Public Function Where(predicate As
  String, ParamArray parameters As
  System.Data.Objects.ObjectParameter()) As
  System.Data.Objects.ObjectQuery`1[[VB$AnonymousType_2(Of
  VB$AnonymousType_2(Of Integer,String,String))' cannot be called with
  these arguments:" &amp; vbCrLf &amp; "    Argument matching parameter
  'predicate' cannot convert from 'VB$AnonymousDelegate_0(Of
  Object,Object)' to 'String'."</p>
</blockquote>

<p>Actually I want to pass an <code>itemList</code> entity to another method and in that method I want to use filter/sorting option dynamically. </p>

<p>Like below</p>

<pre><code>    Dim itemList

    itemList = From items In Context.Product
               Select New With {Key .Code = items.ITEM_CODE_, Key .Name = items.ITEM_NAME, Key .Eancode = items.EANCODE}        
    Call LoadData(itemList)

Sub LoadData(itemList as Object)
    Dim sortList = itemList.Where(Function(u) u.Name.Contains("soap"))
End Sub
</code></pre>

<p>Please share me your suggestions how it can be solved?</p>