Hello,
I am getting a poll from my database has follows:
viewData.PollPa per = (from p in database.Polls
where p.IsPublished == true
select new PollPaper {
Poll = p,
Options = string.Join(", ", (from
o in database.Option s
join ps in database.Polls on o.PollID equals ps.PollID
orderby o.Answer
select o.Answer).ToArr ay())
}).SingleOrDefa ult();
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.PollPa per = (from p in database.Polls
where p.IsPublished == true
select new PollPaper {
Poll = p,
Options = string.Join(", ", (from
o in database.Option s
join ps in database.Polls on o.PollID equals ps.PollID
orderby o.Answer
select o.Answer).ToArr ay())
}).SingleOrDefa ult();
I would like to pick a random poll from all the published polls. How
can I do this?
Thanks,
Miguel
Comment