Exemplo n.º 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);
        }
Exemplo n.º 2
0
 // GET: api/Documents
 public IEnumerable <Document> Get()
 {
     return(_documentRepository.All());
 }