Hi!
I don't have any experience with WF so my answer is only based on what I've seen on the web so far. You may want to check out this blog post.
The problem with Rule Set editor is that it doesn't allow the use of lambda expressions. They are still not first-class citizens in .NET dev tools world, e.g. Immediate window won't compile them either.
As far as I found out, there is no out-of-the-box solution to the problem, but this one looks fine to me:
Place all of your LINQ code style
items in Properties or methods that
you can then access from the Condition
window. Not a superb answer, but it
works in a bind.
You may want to define a property like
public bool HasAnyBeatlesAlbums {
get {
return this.MusicLibrary.Any (cd => cd.Artist == "Beatles");
}
}
and then use this property in your set expression.
I also would like to note that using Any extension method is preferred for finding out if a sequence is not empty because Any doesn't require all elements to be enumerated.
Please let me know it it works for you.