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

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