internal SubimaruSelectionBuilder( DbSelectionContext db, int[] selectionIds, IQueryable <Selection> selectionBaseQuery = null) { _db = db; _selectionIds = selectionIds; selectionBaseQuery = selectionBaseQuery ?? _db.Selections.Where(x => selectionIds.Contains(x.Id)).AsNoTracking(); _selectionBaseSubimaruQuery = selectionBaseQuery.Join(_db.SubimaruSelections.Where(x => !x.IsUx), selection => selection.Id, subimaruSelection => subimaruSelection.Id, (q, e) => new SubimaruIntermediateQuery(e, q)); }
internal ToyakaSelectionBuilder(DbSelectionContext db, int[] selectionIds, IQueryable <Selection> selectionBaseQuery = null) { _db = db; _selectionIds = selectionIds; // обновим наш запрос для toyka selectionBaseQuery = selectionBaseQuery ?? _db.Selections.Where(x => selectionIds.Contains(x.Id)).AsNoTracking(); _selectionBaseToyakaQuery = selectionBaseQuery.Where(x => x.Survey.Type == Shared.SurveyType.Toyaka) .Join(_db.ToykaSelections, selection => selection.Id, toykaSelection => toykaSelection.SelectionId, (q, e) => new ToyakaIntermediateQuery(e, q)); }
internal SelectionBuilder(DbSelectionContext db, int[] selectionIds) { _db = db; _selectionIds = selectionIds; _selectionBaseQuery = _db.Selections.Where(x => selectionIds.Contains(x.Id)).AsNoTracking(); }