S
shapper
Hello,
I am getting a poll from my database has follows:
viewData.PollPaper = (from p in database.Polls
where p.IsPublished == true
select new PollPaper {
Poll = p,
Options = string.Join(", ", (from
o in database.Options
join ps in database.Polls on o.PollID equals ps.PollID
orderby o.Answer
select o.Answer).ToArray())
}).SingleOrDefault();
I would like to pick a random poll from all the published polls. How
can I do this?
Thanks,
Miguel
I am getting a poll from my database has follows:
viewData.PollPaper = (from p in database.Polls
where p.IsPublished == true
select new PollPaper {
Poll = p,
Options = string.Join(", ", (from
o in database.Options
join ps in database.Polls on o.PollID equals ps.PollID
orderby o.Answer
select o.Answer).ToArray())
}).SingleOrDefault();
I would like to pick a random poll from all the published polls. How
can I do this?
Thanks,
Miguel