c# - List<object>.Contains Expression Tree -


I would like to create an expression that will be expected ...

  expression & Lt; Fax & lt; Referenced anti, boolean & gt; & Gt; Expected = (Referenced Entity Referenced Entity) = & gt; ForeignKeys.Contains (referencedEntity.Id); Expression & lt; Funk & lt; Referenced anti, boolean & gt; & Gt; Actual;  

Type of foreign one list & lt; Object & gt;

Even so I have so far and I think it will use this expression. Call) method, but not sure how to really know about it.

  parameter expiration unit parameter = expression. Parameter (typef (trencencede), "referencententi"); Member Expression Member Expression = Expression Property (entity pamator, "id"); Expression expression = expression = expression. Convert (Member Expression, Typef (Object)); // The reason for this is that expression for an ED gives an int // Expression expression in expression. Call (??) = real expression = lambda & lt; funk & lift; referenced entity, Gt; & gt; (????, unit parameter);  

Thanks you.

The solution here is that I could not have done it without the suggestion of Samuel ...

  /// & lt; summary & gt; ///// & lt; / summary & gt; /// & lt; param Names = "Foreign Kicks "& gt; & lt; / param & gt; /// & lt; Return & gt; Private expression & lt; Func & lt; TrentSendentty, Ball & gt; BuildForeignKeysContainsPredicate (list & quot; object; foreign kierce, string Primary) {try the expression & lt; funk & amp;; referenced & amp;; referenced element, bool & gt; & gt;) {parameter expedition unit Parameter = Expression.Parameter (typef (referenced entity), "referenced entity") ; Constant Exposing Forekids Paramat = Expe Ssion.Constant (foreign key, typef (list & gt; object & gt;)); Member Experience Member Expression = Expression. Property (Entity Pmeter, Primer); Expression expression = expression = expression. Convert (Member Expression, Typef (Object)); Expression = expression in express = expression Call (foreign keypaymator, "included", new type [] {}, conversion expansion); Result = expression. Lambda & lt; Func & lt; Trenfensedty, Bullet & gt; & Gt; (Exercise, entity parameter); } Hold (Exceptional) {East; } Return results; }  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -