Exemple #1
0
        public CommandResult Create(
            [FromBody] CreateMatriculaCommand command,
            [FromServices] MatriculaHandler handler,
            [FromServices] IPagamentoRepository pagrepository
            )
        {
            if (pagrepository.GetAll(command.IdAluno).Count() == 0)
            {
                return new CommandResult()
                       {
                           Data    = command,
                           Message = "Não há pagamentos para o aluno",
                           Sucess  = false
                       }
            }
            ;

            return((CommandResult)handler.Handle(command));
        }
Exemple #2
0
 public MatriculaController(IBusClient busClient, MatriculaHandler matriculaHandler)
 {
     _busClient        = busClient;
     _matriculaHandler = matriculaHandler;
 }