public async Task <ActionResult <PollingDivision> > PostPollingDivision(PollingDivision pollingDivision)
        {
            _context.PollingDivisions.Add(pollingDivision);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPollingDivision", new { id = pollingDivision.DivisionId }, pollingDivision));
        }
        public async Task <IActionResult> PutPollingDivision(long id, PollingDivision pollingDivision)
        {
            if (id != pollingDivision.DivisionId)
            {
                return(BadRequest());
            }

            _context.Entry(pollingDivision).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PollingDivisionExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }