Пример #1
0
        public ICommandResult Handle(ProfessorInputDelete command)
        {
            _PREP.Disable(command.ProfessorId);
            var result = new StandardResult();

            if (_PREP.Get(command.ProfessorId).Active != false)
            {
                result.Notifications.Add("Error", "Não foi possivel deletar Docente!");
            }
            else
            {
                result.Notifications.Add("Success", "Professor Deletado");
            }

            return(result);
        }
Пример #2
0
        public async Task Remove(int id)
        {
            var professor = await _professorRepository.FindById(id);

            await _professorRepository.Disable(professor);
        }