动态 Linq Select 串联
我有一个动态选择语句:
“new(PurchaseOrderID as ID_PK, PContractNo + GoodsSupplier.AssociatedTo.DisplayName as Search_Results)”
可以看出,我希望将 'PContractNo' 和 'GoodsSupplier.AssociatedTo.DisplayName' 字段连接到一个返回的字段中名为“Search_Results”的字段。将这两个领域结合起来非常重要。
然而,Linq 库抱怨“+”,表达式解析器将其作为“Concat(等...)”返回,这当然不能转换为存储表达式。
显然,因此我需要一些关于如何格式化选择字符串以便执行我想要的操作的帮助。我已经尝试了很多事情!
任何帮助将不胜感激!
谢谢你,伊恩·麦克
I have a dynamic select statement thus:
"new(PurchaseOrderID as ID_PK, PContractNo + GoodsSupplier.AssociatedTo.DisplayName as Search_Results)"
As can be seen I wish to concatenate the 'PContractNo' and 'GoodsSupplier.AssociatedTo.DisplayName' fields into one returned field named 'Search_Results'. It is important that these two fields are combined.
However the Linq library complains regarding the '+', which the expression parser brings back as a 'Concat(etc...), which of course cannot be translated into a store expression.
Obviously therefore I would like some help regarding just how i should format the select string in order to do what I want. I've tried many things!
Any help would be greatly appreciated!
Thank You, Ian Mac
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个类似的新类
并使用 linq 加入
Create a new Class like
and use linq to join