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 })); }
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)); }
public async Task <IActionResult> ExcluirTurma([FromBody] ExcluirAlunoTurmaCommand command) { return(this.DefaultResponse(await this._alunoApplication.DeleteTurma(command))); }
public async Task <bool> ExcluirTurma(ExcluirAlunoTurmaCommand command) { return(await this._alunoTurmaRepository.Delete(x => x.AlunoId == command.AlunoId && x.TurmaId == command.TurmaId)); }
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)); }