S
shapper
Hello,
I have the following LINQ query:
PostPaper paper = (from p in database.Posts
where p.PostID == id
select new PostPaper {
Post = p,
Tags = new List<Tag>(
from pt in database.PostTags
join t in database.Tags on pt.TagID
equals t.TagID
where pt.PostID == p.PostID
select t).ToString()
}).SingleOrDefault();
Tags should be a string with CSV values. So I added it the ToString()
at the end. However it is returning a List.
What am I doing wrong?
Thanks,
Miguel
I have the following LINQ query:
PostPaper paper = (from p in database.Posts
where p.PostID == id
select new PostPaper {
Post = p,
Tags = new List<Tag>(
from pt in database.PostTags
join t in database.Tags on pt.TagID
equals t.TagID
where pt.PostID == p.PostID
select t).ToString()
}).SingleOrDefault();
Tags should be a string with CSV values. So I added it the ToString()
at the end. However it is returning a List.
What am I doing wrong?
Thanks,
Miguel