Quantcast
Viewing all articles
Browse latest Browse all 79901

How to use PredicateBuilder on early bound queries for Active record state? error: Invalid 'where' condition. An entity member is invoking an invalid property or method

Hi,

Why can this not be used in crm queries?

+ $exception {"Invalid 'where' condition. An entity member is invoking an invalid property or method."} System.NotSupportedException

J.

var predicate = PredicateBuilder.True<Contact>();
predicate = predicate.And(p => p.statecode == (int)ContactState.Active);

var x = serviceContext.ContactSet.Where(predicate);

Predicate builder used from:

http://www.albahari.com/nutshell/predicatebuilder.aspx 


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>