Wednesday, 15 September 2010

linq to entities, operator like WhereAnyIn? -


Before I was in the implementation but I am thinking that someone can write an option in "Where Any Any" For example: Ive an Institutions: Post --- PostTag --- Tags

I need the query with parameter int [] tags, in which the given list contains all the posts containing any tag is done.

I can not understand it

Thank you for your help.

  static zero main (string [] args) {int [] integers = Enumerable.Range (0, 10) .oir (); Expression & lt; Funk & lt; Post, bull & gt; & Gt; Expression = Make these Express & Lt; Post, At & G; (P = & gt; P tag, integers); } Static expression & lt; Func & lt; TItem, bool & gt; & Gt; CreateWhereInExpression & lt; TItem, TValue & gt; (Expression & lt; Func & lt; TItem, TValue & gt; Lambda, TVLu [] items) {if (lambda! = Null) {Member Expression Member Expansion = Lambda. As a Member Member; If (Member Expression! = Null & amp; Member Feedback Experience == Lambda. Parameter [0]) {Body of Expression; If (objects == zero) items Long == 0) {body = expression. Constant (true); } Other {body = items.Skip (1) .growet (expression .aquel (member expression, expression. Constant (item [0])), (expression, item) => expression. Constant (item))); } Return expression. Lambda & lt; Func & lt; TItem, bool & gt; (Body, lambda parameter); }} Return tap; }  

No comments:

Post a Comment