?
Solved

Not Queryable ?

Posted on 2011-04-19
4
Medium Priority
?
272 Views
Last Modified: 2012-05-11
Dim myDatesToCompare As New List(Of DateIndexMatching)

...

Dim finalMatches = From combo In (From _set In myDatesToCompare.OrderBy(Function(x) x.OfDate) Select _set).FirstOrDefault() _
                               Select combo


When I add FirstOrDefault to my LINQ I receive error   Expression of Type ......DateIndexMatching is not Queryable Make sure you are not missing assembly..blabla

Acutally its working great if I remove the firstOrDefault()  I am jsut trying to retrive only the first row of this query...

any idea?
0
Comment
Question by:PhilippeRenaud
  • 2
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35427658
May be you want this

Dim finalMatches = (From combo In (From _set In myDatesToCompare.OrderBy(Function(x) x.OfDate) Select _set)).FirstOrDefault()
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 35427779
with that i have error on the line   Select Combo


saying  end of statement expectped
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35427863
I had removed Select combo.
0
 
LVL 1

Author Closing Comment

by:PhilippeRenaud
ID: 35427932
Perfect
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question