public DateAnswer(Poll poll, DateTime date) : base(poll) { Date = date; }
public DateAnswer(Poll poll) : base(poll) { }
public Task DeletePollAsync(Poll poll) { Context.Polls.Remove(Context.Polls.Find(poll.Id)); return(Task.FromResult(poll)); }
public Task EditPollAsync(Poll poll) => throw new NotImplementedException();
public Task <IList <User> > GetAllUsersForPollAsync(Poll poll) => throw new NotImplementedException();
public async Task ReportPollAsync(Poll poll, String text) { await Context.Reports.AddAsync(new Report(poll, text)); }
public Task RemoveVote <TAnswer>(User user, Poll poll, TAnswer answer) where TAnswer : Answer => throw new NotImplementedException();
public async Task <IList <Answer> > GetAnswersForPollAsync(Poll poll) => await Context.Answers .Include(v => v.Poll) .Where(a => a.Poll.Id == poll.Id) .ToListAsync();
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();