First I want to thanks all the team that is working on Camlex.NET because I find it really great!!! CAML is a pain to write but with Camlex it becomes a pleasure :-).
I'm facing a problem mixing AND and OR in expressions.
Here is my code:
var expressions = new List<Expression<Func<SPListItem, bool>>>();
expressions.Add(x => ((string)x["Moderators"]).Contains(currentUserLoginName));
List<string> entities = myEntities;
HERE I'M MISSING SOMETHING --> see below
var query = Camlex.Query().WhereAll(expressions).ToString();
I want to do some foreach on my "entities" and add the following "dynamic" expression (that is not dynamic right now :-P):
expressions.Add(x => ((string)x["Entity"]).Contains(entities) || ((string)x["Entity"]).Contains(entities) || ((string)x["Entity"]).Contains(entities));
As I don't know how many "entities" I have I can not just hardcode it.
Does it give some syntax to do this?
I tried something like that, but the compiler doesn't like it...
foreach (var entity in entities)
Thanks for help ;-).