S
shapper
Hello,
I have a table named Tags which is related to other two tables
ArticlesTags and FilesTags.
My linq query to select my tags would be something like:
var query = from t in db.Tags
select new
{
TagId = t.TagId,
TagText = t.TagText,
Active = t.FilesTags.Any Or t.ArticlesTags.Any
}
What active specifies if a Tag is associated to a File or
Article.
Now I need to create a new query that retrieves 2 values:
1. Number of existing tags in table Tags.
2. Number of tags which are related to FilesTags or ArticlesTags.
I need to retrieve these 2 values to display in 2 ASP.NET labels.
Could someone, please, help me with this query?
Thanks,
Miguel
I have a table named Tags which is related to other two tables
ArticlesTags and FilesTags.
My linq query to select my tags would be something like:
var query = from t in db.Tags
select new
{
TagId = t.TagId,
TagText = t.TagText,
Active = t.FilesTags.Any Or t.ArticlesTags.Any
}
What active specifies if a Tag is associated to a File or
Article.
Now I need to create a new query that retrieves 2 values:
1. Number of existing tags in table Tags.
2. Number of tags which are related to FilesTags or ArticlesTags.
I need to retrieve these 2 values to display in 2 ASP.NET labels.
Could someone, please, help me with this query?
Thanks,
Miguel