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

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