Ejemplo n.º 1
0
        public static PollDTO CreatePollDTO(int pollId)
        {
            var p    = Polls.GetPollAt(pollId);
            var pdto = new PollDTO
            {
                PollId                   = p.PollId,
                Topic                    = p.Topic,
                Description              = p.Description,
                AllowMultiple            = p.AllowMultiple,
                HideResultsUntilFinished = p.HideResultsUntilFinished,
                HideVoters               = p.HideVoters,
                State                    = p.State,
                StartDate                = p.StartDate,
                EndDate                  = p.EndDate,
                PollCreatorName          = p.PollCreator.Name,
            };

            return(pdto);
        }