Beispiel #1
0
        public IEnumerable <SSRSDto> GetSSRSReportsBySchoolID(int schoolID)
        {
            var query =
                from x in DocumentRepository.All()
                join y in LinkRepository.All() on x.DocumentID equals y.DocumentID
                where x.DocumentTypeID == 2 && y.SchoolID == schoolID
                select new SSRSJoin {
                DocumentID     = x.DocumentID, DocumentName = x.DocumentFilename,
                DocumentTypeID = (int)x.DocumentTypeID, ExtraReportParameters = y.ExtraReportParameters, TopicID = y.TopicID, SchoolID = (int)y.SchoolID
            };

            var data = Mapper.Map <IEnumerable <SSRSJoin>, IEnumerable <SSRSDto> >(query.AsEnumerable());

            return(data);
        }