Exemplo n.º 1
0
        public async Task <IActionResult> ExcluirTurma(Guid id, [Bind("Nome,DataNascimento,Cpf,Id,Cadastro,Atualizado, TurmaId")] AlunoViewModel alunoViewModel)
        {
            var command  = new ExcluirAlunoTurmaCommand(id, alunoViewModel.TurmaId);
            var response = await this._alunoService.DeleteTurma(command);

            return(RedirectToAction("Details", new { id = id }));
        }
Exemplo n.º 2
0
        public async Task <ResponseApi <bool> > DeleteTurma(ExcluirAlunoTurmaCommand command)
        {
            var restRequest = new RestRequest("Aluno/ExcluirTurma", DataFormat.Json);

            restRequest.AddJsonBody(command);
            return(await this._client.DeleteAsync <ResponseApi <bool> >(restRequest));
        }
Exemplo n.º 3
0
 public async Task <IActionResult> ExcluirTurma([FromBody] ExcluirAlunoTurmaCommand command)
 {
     return(this.DefaultResponse(await this._alunoApplication.DeleteTurma(command)));
 }
Exemplo n.º 4
0
 public async Task <bool> ExcluirTurma(ExcluirAlunoTurmaCommand command)
 {
     return(await this._alunoTurmaRepository.Delete(x => x.AlunoId == command.AlunoId && x.TurmaId == command.TurmaId));
 }
Exemplo n.º 5
0
 public async Task <Response <bool> > DeleteTurma(ExcluirAlunoTurmaCommand command)
 {
     return(new Response <bool>(await this._alunoService.ExcluirTurma(command)));
 }
 public GenericCommandResult DeleteStudentInClass(ExcluirAlunoTurmaCommand command, [FromServices] ExcluirAlunoTurmaHandler handle)
 {
     return((GenericCommandResult)handle.Handler(command));
 }