NotContains?

Oct 24, 2011 at 9:51 AM
What logic should be used to implement NotContains?

This is not possible:
var caml =
    Camlex.Query()
        .Where(x => ((string)x["Project"]).Contains("Camlex") == false)
            .ToString();

Thanks!
Developer
Oct 24, 2011 at 10:26 AM
Edited Oct 24, 2011 at 10:28 AM

Unfortunately,

SharePoint CAML syntax for requests doesn't allow it - http://msdn.microsoft.com/en-us/library/ms467521%28v=office.12%29.aspx

Only AND/OR, BeginsWith/Contains, Eq/Neq/Geq/Gt/Leq/Lt, IsNull/IsNotNull and DateRangesOverlap items in WHERE clause are supported.

So the only way out for you is to retrieve all items and filter them in-memory.