0

我写了这段很棒的代码,但现在我无法使用。

当前工作示例:

complete item = ReliableExecution.RetryWithExpression<complete, complete>(u => u.FirstOrDefault(x => x.str_en == segment));

这是 RetryWithExpression 代码的一部分:

public static TValue RetryWithExpression<T, TValue>(Func<ObjectSet<T>, TValue> func, Int32 retryInfiniteLoopGuard = 0)
     where T : class
{
    RetryPolicy policy = RetryPolicyProvider.GetSqlAzureRetryPolicy();
    using (DDEntities dataModel = new DDEntities())
    {
        var entitySet = dataModel.CreateObjectSet<T>();

              ...

                var query = policy.ExecuteAction(() => (func(entitySet)));

              ...

现在我的问题是如何将上述选择查询更改为 SELECT * ?

我确实尝试过,但它告诉我一些我不明白的错误:

complete item = ReliableExecution.RetryWithExpression<complete, complete>(u => u.Select(x => x.str_en != ""));
4

1 回答 1

0

IQueryable<complete> items = ReliableExecution.RetryWithExpression<complete, IQueryable<complete>>(u => u.Where(x => x.str_en != ""));?

于 2012-08-01T04:19:18.440 回答