本文整理汇总了C#中MetadataWorkspace.GetQueryCacheManager方法的典型用法代码示例。如果您正苦于以下问题:C# MetadataWorkspace.GetQueryCacheManager方法的具体用法?C# MetadataWorkspace.GetQueryCacheManager怎么用?C# MetadataWorkspace.GetQueryCacheManager使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetadataWorkspace
的用法示例。
在下文中一共展示了MetadataWorkspace.GetQueryCacheManager方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateShaperInfo
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);
}
示例2: CreateShaperInfo
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);
}