Example #1
0
            public async Task <Unit> Handle(Eject request, CancellationToken cancellationToken)
            {
                var resultados = await _instructorRepository.Delete(request.Id);

                if (resultados > 0)
                {
                    return(Unit.Value);
                }

                throw new Exception("Not Data Instructor Delete");
            }
Example #2
0
            public async Task <Unit> Handle(Execute request, CancellationToken cancellationToken)
            {
                var results = await _instructorRepository.Delete(request.Id);

                if (results > 0)
                {
                    return(Unit.Value);
                }

                throw new Exception("Something wrong, dont delete instructor");
            }