本文整理汇总了C#中DbExpression.BindAs方法的典型用法代码示例。如果您正苦于以下问题:C# DbExpression.BindAs方法的具体用法?C# DbExpression.BindAs怎么用?C# DbExpression.BindAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DbExpression
的用法示例。
在下文中一共展示了DbExpression.BindAs方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplySortOrderToSkip
protected DbSkipExpression ApplySortOrderToSkip(DbExpression input, DbSortExpression sort, DbExpression k)
{
DbExpressionBinding inputBinding = input.BindAs(sort.Input.VariableName);
return inputBinding.Skip(sort.SortOrder, k);
}
示例2: RebindSkip
protected DbSkipExpression RebindSkip(DbExpression input, DbSkipExpression skip, DbExpression k)
{
DbExpressionBinding inputBinding = input.BindAs(skip.Input.VariableName);
return inputBinding.Skip(skip.SortOrder, k);
}
示例3: ApplySkipOrderToSort
protected DbSortExpression ApplySkipOrderToSort(DbExpression input, DbSkipExpression sortSpec)
{
DbExpressionBinding inputBinding = input.BindAs(sortSpec.Input.VariableName);
return inputBinding.Sort(sortSpec.SortOrder);
}
示例4: RebindSort
protected DbSortExpression RebindSort(DbExpression input, DbSortExpression sort)
{
DbExpressionBinding inputBinding = input.BindAs(sort.Input.VariableName);
return inputBinding.Sort(sort.SortOrder);
}
示例5: RebindFilter
protected DbFilterExpression RebindFilter(DbExpression input, DbFilterExpression filter)
{
DbExpressionBinding inputBinding = input.BindAs(filter.Input.VariableName);
return inputBinding.Filter(filter.Predicate);
}
示例6: RebindProject
protected DbProjectExpression RebindProject(DbExpression input, DbProjectExpression project)
{
DbExpressionBinding inputBinding = input.BindAs(project.Input.VariableName);
return inputBinding.Project(project.Projection);
}
示例7: TranslateLambda
// Utility translator method for lambda expressions. Given a lambda expression and its translated
// inputs, translates the lambda expression, assuming the input is a collection
private DbExpression TranslateLambda(
LambdaExpression lambda, DbExpression input, string bindingName, out DbExpressionBinding binding)
{
input = NormalizeSetSource(input);
// create binding context for this lambda expression
binding = input.BindAs(bindingName);
return TranslateLambda(lambda, binding.Variable);
}