Example #1
0
 public DateAnswer(Poll poll, DateTime date) : base(poll)
 {
     Date = date;
 }
Example #2
0
 public DateAnswer(Poll poll) : base(poll)
 {
 }
Example #3
0
        public Task DeletePollAsync(Poll poll)
        {
            Context.Polls.Remove(Context.Polls.Find(poll.Id));

            return(Task.FromResult(poll));
        }
Example #4
0
 public Task EditPollAsync(Poll poll) => throw new NotImplementedException();
Example #5
0
 public Task <IList <User> > GetAllUsersForPollAsync(Poll poll) => throw new NotImplementedException();
Example #6
0
 public async Task ReportPollAsync(Poll poll, String text)
 {
     await Context.Reports.AddAsync(new Report(poll, text));
 }
Example #7
0
 public Task RemoveVote <TAnswer>(User user, Poll poll, TAnswer answer) where TAnswer : Answer =>
 throw new NotImplementedException();
Example #8
0
 public async Task <IList <Answer> > GetAnswersForPollAsync(Poll poll) => await Context.Answers
 .Include(v => v.Poll)
 .Where(a => a.Poll.Id == poll.Id)
 .ToListAsync();
Example #9
0
 public async Task <IList <Vote> > GetVotesForPollAsync(Poll poll) => await Context.Votes
 .Include(v => v.Poll)
 .Include(v => v.Answer)
 .Include(v => v.User)
 .Where(v => v.Poll.Id == poll.Id)
 .ToListAsync();