Exemplo n.º 1
0
        public async Task <Election> AddElection(Election newElection)
        {
            _dbContext.Elections.Add(newElection);
            await _dbContext.SaveChangesAsync();

            return(newElection);
        }
        public async Task <Candidate> AddCandidate(Candidate newCandidate)
        {
            _dbContext.Candidates.Add(newCandidate);
            await _dbContext.SaveChangesAsync();

            return(newCandidate);
        }