Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.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
C# CAML查询返回不带过滤器的记录_C#_Sharepoint_Csom_Caml - Fatal编程技术网

C# CAML查询返回不带过滤器的记录

C# CAML查询返回不带过滤器的记录,c#,sharepoint,csom,caml,C#,Sharepoint,Csom,Caml,我不熟悉CAML查询。我正在使用以下查询获取具有条件的筛选记录: string query = "<View><Query><Where><AND>" + "<Neq><FieldRef Name='Status'/>" + "<Value Typ

我不熟悉CAML查询。我正在使用以下查询获取具有条件的筛选记录:

string query = "<View><Query><Where><AND>" +
                               "<Neq><FieldRef Name='Status'/>" +
                               "<Value Type='Text'>Pending(draft)</Value>" +
                               "</Neq>" +
                               "<Eq><FieldRef Name='IsNotify'/> " +
                               "<Value Type='Boolean'>0</Value>" +
                               "</Eq>" +
                           "</AND></Where></Query></View>";

            camlQuery.ViewXml = query;
            ListItemCollection listItems = list.GetItems(camlQuery);
            CContext.Load(listItems);
            CContext.ExecuteQuery();
string查询=”

根据查询,我希望ID为2和21的记录如下

但是我得到了所有的记录:请帮助我哪里出了问题