我写了这段很棒的代码,但现在我无法使用。
当前工作示例:
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 != ""));