Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
LINQ到实体Where子句带有或条件?_Linq_Entity Framework_Entity Framework 4_Linq To Entities - Fatal编程技术网

LINQ到实体Where子句带有或条件?

LINQ到实体Where子句带有或条件?,linq,entity-framework,entity-framework-4,linq-to-entities,Linq,Entity Framework,Entity Framework 4,Linq To Entities,我以编程方式在EntityDataSource上设置Where子句,如下所示: edsCheckListEntities.Where = "not it.business_done" 不幸的是,这没有捕获任何空值,这些值也是“未完成”的,因此我尝试了以下方法: edsCheckListEntities.Where = "it.business_done is nothing or not it.business_done" 但这是一个错误。有没有办法在实体数据源where子句中执行或类似的操

我以编程方式在EntityDataSource上设置Where子句,如下所示:

edsCheckListEntities.Where = "not it.business_done"
不幸的是,这没有捕获任何空值,这些值也是“未完成”的,因此我尝试了以下方法:

edsCheckListEntities.Where = "it.business_done is nothing or not it.business_done"
但这是一个错误。有没有办法在实体数据源where子句中执行或类似的操作?

我怀疑您只是想使用而不是“什么都不是”:

(我没有使用任何实体SQL,但我只是从文档开始。)

edsCheckListEntities.Where = "it.business_done is null or not it.business_done"