S
shapper
Hello,
I have the following Linq query:
List<PostsTag> insert = (from t in
(from t in database.Tags
join p in paper.Tags on t.Name
equals p.Name
select t).ToList()
select new PostsTag {
PostID = paper.Post.PostID,
TagID = t.TagID
}).ToList();
How can I convert this query to use Linq's Group instead of using the
sub query?
Tags table has 2 fields: TagID and Name
PostTags table has 2 fields PostId and TagID
Thanks,
Miguel
I have the following Linq query:
List<PostsTag> insert = (from t in
(from t in database.Tags
join p in paper.Tags on t.Name
equals p.Name
select t).ToList()
select new PostsTag {
PostID = paper.Post.PostID,
TagID = t.TagID
}).ToList();
How can I convert this query to use Linq's Group instead of using the
sub query?
Tags table has 2 fields: TagID and Name
PostTags table has 2 fields PostId and TagID
Thanks,
Miguel