本文整理汇总了C#中IQuerySource类的典型用法代码示例。如果您正苦于以下问题:C# IQuerySource类的具体用法?C# IQuerySource怎么用?C# IQuerySource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IQuerySource类属于命名空间,在下文中一共展示了IQuerySource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: QuerySourceReferenceExpression
public QuerySourceReferenceExpression (IQuerySource querySource)
{
ArgumentUtility.CheckNotNull ("querySource", querySource);
_type = querySource.ItemType;
ReferencedQuerySource = querySource;
}
示例2: Visit
public LambdaExpression Visit(Expression clause, System.Type resultType, IQuerySource querySource)
{
_inputParameter = Expression.Parameter(resultType, "inputParameter");
_querySource = querySource;
return Expression.Lambda(VisitExpression(clause), _inputParameter);
}
示例3: Create
/// <summary>
/// This API supports the Entity Framework Core infrastructure and is not intended to be used
/// directly from your code. This API may change or be removed in future releases.
/// </summary>
public virtual ExpressionVisitor Create(
EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
=> new InMemoryEntityQueryableExpressionVisitor(
_model,
_materializerFactory,
Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
querySource);
示例4: IncludeExpressionVisitor
public IncludeExpressionVisitor(
[NotNull] ISelectExpressionFactory selectExpressionFactory,
[NotNull] IMaterializerFactory materializerFactory,
[NotNull] ICommandBuilderFactory commandBuilderFactory,
[NotNull] IRelationalAnnotationProvider relationalAnnotationProvider,
[NotNull] ISqlQueryGeneratorFactory sqlQueryGeneratorFactory,
[NotNull] IQuerySource querySource,
[NotNull] IReadOnlyList<INavigation> navigationPath,
[NotNull] RelationalQueryCompilationContext queryCompilationContext,
[NotNull] IReadOnlyList<int> queryIndexes,
bool querySourceRequiresTracking)
{
Check.NotNull(selectExpressionFactory, nameof(selectExpressionFactory));
Check.NotNull(materializerFactory, nameof(materializerFactory));
Check.NotNull(commandBuilderFactory, nameof(commandBuilderFactory));
Check.NotNull(relationalAnnotationProvider, nameof(relationalAnnotationProvider));
Check.NotNull(sqlQueryGeneratorFactory, nameof(sqlQueryGeneratorFactory));
Check.NotNull(querySource, nameof(querySource));
Check.NotNull(navigationPath, nameof(navigationPath));
Check.NotNull(queryCompilationContext, nameof(queryCompilationContext));
Check.NotNull(queryIndexes, nameof(queryIndexes));
_selectExpressionFactory = selectExpressionFactory;
_materializerFactory = materializerFactory;
_commandBuilderFactory = commandBuilderFactory;
_relationalAnnotationProvider = relationalAnnotationProvider;
_sqlQueryGeneratorFactory = sqlQueryGeneratorFactory;
_querySource = querySource;
_navigationPath = navigationPath;
_queryCompilationContext = queryCompilationContext;
_queryIndexes = queryIndexes;
_querySourceRequiresTracking = querySourceRequiresTracking;
}
示例5: Create
public virtual ExpressionVisitor Create(
EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
=> new RelationalProjectionExpressionVisitor(
_sqlTranslatingExpressionVisitorFactory,
_entityMaterializerSource,
(RelationalQueryModelVisitor)Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
Check.NotNull(querySource, nameof(querySource)));
示例6: Add
public void Add(IQuerySource querySource)
{
if (_map.ContainsKey(querySource))
return;
_map.Add(querySource, CreateUniqueName(querySource.ItemName));
}
示例7: AddSelectPart
public bool AddSelectPart(IQuerySource qs, string sql, string name, Type type, Func<ResultObjectMapping, BufferedTextReader, IDataReader, object> instancer)
{
if (Selects.Any(kv => kv.Name == name))
return false;
Selects.Add(new SelectSource { QuerySource = qs, Sql = sql, Name = name, ItemType = type, Instancer = instancer });
CurrentSelectIndex++;
return true;
}
示例8: RelationalEntityQueryableExpressionTreeVisitor
public RelationalEntityQueryableExpressionTreeVisitor(
[NotNull] RelationalQueryModelVisitor queryModelVisitor,
[NotNull] IQuerySource querySource)
: base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
{
Check.NotNull(querySource, nameof(querySource));
_querySource = querySource;
}
示例9: ContactListViewModel
public ContactListViewModel(IQuerySource querySource)
{
_querySource = querySource;
_treeLayout = new TreeContactLayout();
_plotLayout = new PlotContactLayout(querySource);
AttemptToSetLayout();
}
示例10: ReplaceMapping
public void ReplaceMapping (IQuerySource querySource, Expression expression)
{
ArgumentUtility.CheckNotNull ("querySource", querySource);
ArgumentUtility.CheckNotNull ("expression", expression);
if (!ContainsMapping (querySource))
throw new InvalidOperationException ("Query source has not been associated with an expression, cannot replace its mapping.");
_lookup[querySource] = expression;
}
示例11: Create
public virtual QueryFlattener Create(
IQuerySource querySource,
RelationalQueryCompilationContext relationalQueryCompilationContext,
MethodInfo operatorToFlatten,
int readerOffset)
=> new QueryFlattener(
querySource,
relationalQueryCompilationContext,
operatorToFlatten,
readerOffset);
示例12: Create
/// <summary>
/// Creates a new ExpressionVisitor.
/// </summary>
/// <param name="queryModelVisitor"> The query model visitor. </param>
/// <param name="querySource"> The query source. </param>
/// <returns>
/// An ExpressionVisitor.
/// </returns>
public virtual ExpressionVisitor Create(
EntityQueryModelVisitor queryModelVisitor, IQuerySource querySource)
=> new RelationalEntityQueryableExpressionVisitor(
_model,
_selectExpressionFactory,
_materializerFactory,
_shaperCommandContextFactory,
_relationalAnnotationProvider,
(RelationalQueryModelVisitor)Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)),
querySource);
开发者ID:RickyLin,项目名称:EntityFramework,代码行数:18,代码来源:RelationalEntityQueryableExpressionVisitorFactory.cs
示例13: GetExpression
public Expression GetExpression (IQuerySource querySource)
{
ArgumentUtility.CheckNotNull ("querySource", querySource);
Expression expression;
if (!_lookup.TryGetValue (querySource, out expression))
throw new KeyNotFoundException (string.Format ("Query source ({0}) has not been associated with an expression.", querySource));
return expression;
}
示例14: RelationalProjectionExpressionTreeVisitor
public RelationalProjectionExpressionTreeVisitor(
[NotNull] RelationalQueryModelVisitor queryModelVisitor,
[NotNull] IQuerySource querySource)
: base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
{
_querySource = querySource;
_sqlTranslatingExpressionTreeVisitor
= new SqlTranslatingExpressionTreeVisitor(queryModelVisitor);
}
示例15: RelationalProjectionExpressionVisitor
public RelationalProjectionExpressionVisitor(
[NotNull] RelationalQueryModelVisitor queryModelVisitor,
[NotNull] IQuerySource querySource)
: base(Check.NotNull(queryModelVisitor, nameof(queryModelVisitor)))
{
Check.NotNull(querySource, nameof(querySource));
_queryModelVisitor = queryModelVisitor;
_querySource = querySource;
}