public void insert(TimeEleicao obj) { var validator = new TimeEleicaoValidator(); var result = validator.Validate(obj); if (result.IsValid) { listaTimeEleicao.Add(obj); } else { throw new Exception(result.Errors.FirstOrDefault().ToString()); } }
public async Task <IActionResult> Post(TimeEleicao timeEleicao) { return(Ok("Candidatos castrados com sucesso !!")); }
public void IserirTime(TimeEleicao timeEleicao) { throw new NotImplementedException(); }