示例#1
0
        public List <DisciplineViewModel> Read(DisciplineBindingModel model)
        {
            if (model == null)
            {
                return(disciplineStorage.GetFullList());
            }

            return(new List <DisciplineViewModel> {
                disciplineStorage.GetElement(model)
            });
        }
示例#2
0
 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));
 }