Пример #1
0
        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());
            }
        }
Пример #2
0
 public async Task <IActionResult> Post(TimeEleicao timeEleicao)
 {
     return(Ok("Candidatos castrados com sucesso !!"));
 }
Пример #3
0
 public void IserirTime(TimeEleicao timeEleicao)
 {
     throw new NotImplementedException();
 }