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

            return(Task.FromResult(poll));
        }
Beispiel #4
0
 public Task EditPollAsync(Poll poll) => throw new NotImplementedException();
Beispiel #5
0
 public Task <IList <User> > GetAllUsersForPollAsync(Poll poll) => throw new NotImplementedException();
Beispiel #6
0
 public async Task ReportPollAsync(Poll poll, String text)
 {
     await Context.Reports.AddAsync(new Report(poll, text));
 }
Beispiel #7
0
 public Task RemoveVote <TAnswer>(User user, Poll poll, TAnswer answer) where TAnswer : Answer =>
 throw new NotImplementedException();
Beispiel #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();
Beispiel #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();