Hello,
I have the following Linq query:
PostPaper paper = (from p in database.Posts
where p.PostID == id
select new PostPaper {
Post =
p,
Tags = (from pt in database.PostsT ags
join t in database.Tags on pt.TagID
equals t.TagID
where pt.PostID == id
orderby t.Name
select t.Name) as tb,
ViewTags = tb.ToArray()
}).SingleOrDefa ult();
The following is not working:
select t.Name) as tb,
ViewTags = tb.ToArray()
Basically, I need to define ViewTags as an array by converting the
list Tags.
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 = (from pt in database.PostsT ags
join t in database.Tags on pt.TagID
equals t.TagID
where pt.PostID == id
orderby t.Name
select t.Name) as tb,
ViewTags = tb.ToArray()
}).SingleOrDefa ult();
The following is not working:
select t.Name) as tb,
ViewTags = tb.ToArray()
Basically, I need to define ViewTags as an array by converting the
list Tags.
Thanks,
Miguel