コード例 #1
0
        public async Task <IActionResult> GenerarVotacion(ResultadosElecciones votacion)
        {
            var result = await _votacionBusiness.GenerarVotacion(votacion);

            if (!result)
            {
                return(View());
            }

            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public async Task <bool> GenerarVotacion(ResultadosElecciones votacion)
 {
     return(await _votacionRepository.GenerarVotacion(votacion));
 }
コード例 #3
0
 public async Task <bool> GenerarVotacion(ResultadosElecciones votacion)
 {
     _db.ResultadosElecciones.Add(votacion);
     return(await _db.SaveChangesAsync() > 0);
 }