Example #1
0
        public IActionResult Post([FromForm] AlunoTurma alunoturma)
        {
            try {
                _alunoturmaRepository.Adicionar(alunoturma);

                return(Ok(alunoturma));
            }
            catch (Exception ex) {
                return(BadRequest(ex.Message));
            }
        }
Example #2
0
 public IActionResult Post([FromBody] AlunoTurma alunoTurma)
 {
     try
     {
         _repo.Adicionar(alunoTurma);
         return(Ok(alunoTurma));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }