Пример #1
0
        private static IEnumerable <FileReference> GetFileReferences(FilesDataContext dc, IEnumerable <Guid> ids, Range range)
        {
            dc.LoadOptions = FileReferenceLoadOptions;

            ids = ids.Distinct();
            if (range.Skip == 0)
            {
                return(range.Take != null
                    ? GetFileReferencesTakeQuery(dc, new SplitList <Guid>(ids).ToString(), range)
                    : GetFileReferencesQuery(dc, new SplitList <Guid>(ids).ToString()));
            }
            return(range.Take != null
                ? GetFileReferencesSkipTakeQuery(dc, new SplitList <Guid>(ids).ToString(), range)
                : GetFileReferencesSkipQuery(dc, new SplitList <Guid>(ids).ToString(), range));
        }
Пример #2
0
 private static FileReference GetFileReferenceByCriteria(FilesDataContext dc, FileCriteria criteria)
 {
     dc.LoadOptions = FileReferenceLoadOptions;
     return(GetFileReferenceByCriteriaQuery(dc, criteria));
 }
Пример #3
0
 private static FileReference GetFileReference(FilesDataContext dc, Guid id)
 {
     dc.LoadOptions = FileReferenceLoadOptions;
     return(GetFileReferenceQuery(dc, id));
 }