ObjectDataSource and Linq

S

shapper

Hello,

I am using LINQ in a ObjectDataSource to feed a ListView:

' odsTags_Selecting
Private Sub odsTags_Selecting(ByVal sender As Object, ByVal e As
ObjectDataSourceSelectingEventArgs) Handles odsTags.Selecting

' Create database
Dim database As New CodeDataContext

' Select tags
Dim tags = From t In database.Tags _
Select t.TagID, _
t.Text, _
Active = t.FilesTags.Any Or t.ArticlesTags.Any

End Sub ' odsTags_Selecting

How can now use the records retrieved?

Thanks,

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,836
Messages
2,569,750
Members
45,545
Latest member
rapter____0

Latest Threads

Top