我无法在Linq查询中添加包含. [英] I am not able to add Contains in Linq Query.

查看:69
本文介绍了我无法在Linq查询中添加包含.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

from a in db.Test where  (a.Test.SecNo.Contains(CodeNo)) select a;



在此LINQ查询中,我无法添加包含.谁能解决这个问题. SecNo数据类型为十进制.



In this LINQ Query i am not able to add Contains. Can any one please solve this. SecNo DataType is Decimal.

推荐答案

十进制 [^ ]没有包含方法...
它应该包含什么?您可以检查它是否大于(>)或小于(<)CodeNo(还有更多),但不能检查它是否包含CodeNo ...
Decimal[^] does not have a Contains Method...
What should it contain? You can check if it is greater than (>) or fewer than (<) CodeNo (and quite a bit more), but not if it contains CodeNo...


这篇关于我无法在Linq查询中添加包含.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆