private static KeyValuePair <Shaper <RecordState>, CoordinatorFactory <RecordState> > CreateShaperInfo(DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace)
        {
            Debug.Assert(storeDataReader != null, "null storeDataReaders?");
            Debug.Assert(columnMap != null, "null columnMap?");
            Debug.Assert(workspace != null, "null workspace?");

            System.Data.Common.QueryCache.QueryCacheManager cacheManager = workspace.GetQueryCacheManager();
            const System.Data.Objects.MergeOption           NoTracking   = System.Data.Objects.MergeOption.NoTracking;

            ShaperFactory <RecordState> shaperFactory = Translator.TranslateColumnMap <RecordState>(cacheManager, columnMap, workspace, null, NoTracking, true);
            Shaper <RecordState>        recordShaper  = shaperFactory.Create(storeDataReader, null, workspace, System.Data.Objects.MergeOption.NoTracking, true);

            return(new KeyValuePair <Shaper <RecordState>, CoordinatorFactory <RecordState> >(recordShaper, recordShaper.RootCoordinator.TypedCoordinatorFactory));
        }
        private KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>> CreateShaperInfo(
            DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace)
        {
            Contract.Requires(storeDataReader != null);
            Contract.Requires(columnMap != null);
            Contract.Requires(workspace != null);

            var cacheManager = workspace.GetQueryCacheManager();
            const MergeOption NoTracking = MergeOption.NoTracking;

            var shaperFactory = _translator.TranslateColumnMap<RecordState>(cacheManager, columnMap, workspace, null, NoTracking, true);
            var recordShaper = shaperFactory.Create(storeDataReader, null, workspace, MergeOption.NoTracking, true);

            return new KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>(
                recordShaper, recordShaper.RootCoordinator.TypedCoordinatorFactory);
        }
예제 #3
0
        private KeyValuePair <Shaper <RecordState>, CoordinatorFactory <RecordState> > CreateShaperInfo(
            DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace)
        {
            DebugCheck.NotNull(storeDataReader);
            DebugCheck.NotNull(columnMap);
            DebugCheck.NotNull(workspace);

            var cacheManager             = workspace.GetQueryCacheManager();
            const MergeOption NoTracking = MergeOption.NoTracking;

            var shaperFactory = _translator.TranslateColumnMap <RecordState>(cacheManager, columnMap, workspace, null, NoTracking, true);
            var recordShaper  = shaperFactory.Create(storeDataReader, null, workspace, MergeOption.NoTracking, true);

            return(new KeyValuePair <Shaper <RecordState>, CoordinatorFactory <RecordState> >(
                       recordShaper, recordShaper.RootCoordinator.TypedCoordinatorFactory));
        }
        private static KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>> CreateShaperInfo(DbDataReader storeDataReader, ColumnMap columnMap, MetadataWorkspace workspace)
        {
            Debug.Assert(storeDataReader != null, "null storeDataReaders?");
            Debug.Assert(columnMap != null, "null columnMap?");
            Debug.Assert(workspace != null, "null workspace?");

            System.Data.Common.QueryCache.QueryCacheManager cacheManager = workspace.GetQueryCacheManager();
            const System.Data.Objects.MergeOption NoTracking = System.Data.Objects.MergeOption.NoTracking;

            ShaperFactory<RecordState> shaperFactory = Translator.TranslateColumnMap<RecordState>(cacheManager, columnMap, workspace, null, NoTracking, true);
            Shaper<RecordState> recordShaper = shaperFactory.Create(storeDataReader, null, workspace, System.Data.Objects.MergeOption.NoTracking, true);

            return new KeyValuePair<Shaper<RecordState>, CoordinatorFactory<RecordState>>(recordShaper, recordShaper.RootCoordinator.TypedCoordinatorFactory);
        }