//To update the vote count of a team by one public int RecordVote(Candidatos2018 candidato) { try { _context.Database.ExecuteSqlCommand("update Candidatos2018 set QuantidadeVotos = QuantidadeVotos + 1 where CandidatoId = {0}", parameters: candidato.CandidatoId); return(1); } catch { throw; } }
public int UpdateVoteCount([FromBody] Candidatos2018 candidato) { return(_repositorio.RecordVote(candidato)); }