Beispiel #1
0
 public void Post([FromServices] IAlunoApplicationService application,
                  [FromBody] AlunoCriacaoDto aluno)
 {
     if (ModelState.IsValid)
     {
         application.Criar(aluno);
     }
 }
        public void Criar(AlunoCriacaoDto entidade)
        {
            Aluno aluno = ObjectMapper.Mapper.Map <Aluno>(entidade);

            if (!aluno.IsValid())
            {
                throw new System.Exception();
            }
        }