public IActionResult Edit(int id, Aluno aluno)
 {
     if (id != aluno.Id)
     {
         return(BadRequest());
     }
     _alunoService.Update(aluno);
     return(RedirectToAction(nameof(Index)));
 }
Example #2
0
        public IActionResult Update(string id, Aluno alunoIn)
        {
            var aluno = _alunosService.Get(id);

            if (aluno == null)
            {
                return(NotFound());
            }

            _alunosService.Update(id, alunoIn);

            return(NoContent());
        }