Linq. Count records

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shapper

    Linq. Count records

    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
Working...