Linq. Count records

S

shapper

Hello,

I have a table named Tags which is related to other two tables
ArticlesTags and FilesTags. My Linq select query is:

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

Now I need to create a new query that retrieves 2 values:

1. Total number of existing tags in table Tags
2. Number of all those tags which are related to FilesTags or
ArticlesTags.

I need to retrieve these 2 values.

How can I do this?

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

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top