public DisciplineResultQueryGet Handle(DisciplineInputGet command) { var result = new DisciplineResultQueryGet(); result.Discipline = _DREP.Get(command.DisciplineId); return(result); }
public void DeleteDiscipline(Discipline selectedDiscipline) { using (var scope = Db.BeginWork()) { var baseEntity = _disciplineRepository.Get(u => u.Id == selectedDiscipline.Id); if (baseEntity != null) { _disciplineRepository.Delete(baseEntity); scope.SaveChanges(); } } }
public ICommandResult Handle(DisciplineInputDelete command) { _DREP.Delete(command.DisciplineId); var result = new StandardResult(); if (_DREP.Get(command.DisciplineId) != null) { result.Notifications.Add("Error", "Não foi possivel deletar Discente!"); } else { result.Notifications.Add("Success", "Discente Deletado"); } return(result); }
/// <summary> /// Get list of all discipline. /// </summary> /// <returns></returns> IEnumerable <Discipline> IDisciplineService.GetAllDisciplines() { var disciplines = _repo.Get(); return(disciplines); }
/// <summary> /// Получает дисциплину по идентификатору. /// </summary> /// <param name="id">Идентификатор.</param> /// <returns>Дисциплина.</returns> public DisciplineItem GetById(int id) { return(_disciplineRepository.Get(id)); }
/// <summary> /// 获取地区统计信息 /// </summary> public Discipline Get(string disciplineCode) { return(disciplineRepository.Get(disciplineCode)); }