Exemple #1
0
        public IEnumerable <ScheduleDTO> FindBy(Expression <Func <ScheduleDTO, bool> > predicate)
        {
            Expression <Func <Schedule, bool> > expressionDAL = ConvertTypeExpression.ConvertType <ScheduleDTO, Schedule>(predicate.Body);

            return(scheduleRepo.FindBy(expressionDAL).ToList().Select(s => (ScheduleDTO)s));
        }
        public IEnumerable <CourseDTO> FindBy(Expression <Func <CourseDTO, bool> > predicate)
        {
            Expression <Func <Course, bool> > predicateDAL = ConvertTypeExpression.ConvertType <CourseDTO, Course>(predicate.Body);

            return(courseRepo.FindBy(predicateDAL).ToList().Select(c => (CourseDTO)c));
        }