I need to create an expression tree, which I can pass along as predicate argument in Where clause to Linq To Enities query.
public static IQueryable<TSource> Where<TSource>(this IQueryable<TSource> source,
Expression<Func<TSource, bool>> predicate);
Expression tree must be equivalent to where clause specified as below:
var query = context.Products.Select(product =>
new { product.Name, product.Color });
var arr = "Red;Black".Split(';');
query = query.Where(obj => arr.Contains(obj.Color));
Googled it out!
And it works!