public List <DisciplineViewModel> Read(DisciplineBindingModel model) { if (model == null) { return(disciplineStorage.GetFullList()); } return(new List <DisciplineViewModel> { disciplineStorage.GetElement(model) }); }
public List <DisciplineViewModel> Read(DisciplineBindingModel model) { if (model == null) { return(_disciplineStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <DisciplineViewModel> { _disciplineStorage.GetElement(model) }); } return(_disciplineStorage.GetFilteredList(model)); }