c# - 解码 LINQ 的服务?

标签 c# .net linq

我继承了一些 LINQ,我想将其重写为非 LINQ C#,这样我就可以找出失败的部分。

(我已经订购了 ReSharper,但 JetBrains 的许可证 key 似乎很慢。)

LINQ 是

var accounts = from a in srvContext.CreateQuery<Incident>()
                join b in srvContext.CreateQuery<integ_benefitallowances>() on a.integ_BenefitId.Id equals b.integ_benefitallowancesId.Value
                where b.integ_BenefitId.Id == _currentIncident.integ_BenefitId.Id
                where a.Integ_DependantId.Id == a.Integ_DependantId.Id
                where a.integ_ClaimStatus.Value == 0 || a.integ_ClaimStatus.Value == 2
                where a.Integ_DateofClaim.Value > timePeriod
                select new Incident
                {
                     LogicalName = a.LogicalName
                };

错误是

System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: There was an error with this process
variable '<>h__TransparentIdentifier2' of type '<>f__AnonymousType0`2[PaycareCRM.Incident,PaycareCRM.integ_benefitallowances]' referenced from scope '', but it is not defined

是否有网站或简单工具可以帮我将 LINQ 转换为普通 C#?

最佳答案

关于c# - 解码 LINQ 的服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19135491/

相关文章:

c# - 在 javascript 中访问 c​​# 公共(public)属性

c# - 如何将新输入的项目保存到组合框项目源中?

c# - 将 double 转换为小数点后特定数字的科学计数法

c# - 通过代码或配置注入(inject)依赖项的优缺点

c# - 使用 Queryable 代替扩展方法

C# 将 System.Func<Tderived, bool> 转换为 System/Func<Tbase, bool>

.NET 配置部分设计器 - 我的集合在哪里?

c# - 正确实现GetHashCode

c# - 如何在 OpenXML SDK 中拆分文档

sql-server - 在 SQL Profiler 中查找特定 LINQ 查询的巧妙技巧