Esempio n. 1
0
        public List <SingleVoteItem> GetSingleVoteItems()
        {
            var builder = new SingleVoteTicketBuilder();
            var items   = Context.SingleVotes
                          .Include("BallotIssue")
                          .Include("Candidate").Include("Candidate.Job")
                          .Select(builder.GetModel).ToList();

            return(items);
        }
Esempio n. 2
0
        public List <SingleVoteItem> GetSingleVoteItemsByIds(List <Guid?> ids)
        {
            var builder = new SingleVoteTicketBuilder();
            var items   = Context.SingleVotes
                          .Include("BallotIssue")
                          .Include("Candidate").Include("Candidate.Job")
                          .Select(builder.GetModel).ToList();

            items = items.Where(x => ids.Contains(x.SingleVoteTicketId)).ToList();
            return(items);
        }