Beispiel #1
0
        public IActionResult Post([FromBody] Alunos aluno)
        {
            if (aluno == null)
            {
                return(BadRequest());
            }

            return(Ok(_ialunos.Create(aluno)));
        }
Beispiel #2
0
        public IActionResult Post([FromBody] CreateAlunoInputModel inputModel)
        {
            var id = _aluno.Create(inputModel);

            return(CreatedAtAction(nameof(GetById), new { id = id }, inputModel));
        }