01-05-2010 11:02 AM
So I am able to create a filter to Contacts of a certain type, but am unable to filter that type out and leave everyone else behind.
IRepository<IContact> repository = EntityFactory.GetRepository<IContact>();
IQueryable qry = (IQueryable)repository;
IExpressionFactory ef = qry.GetExpressionFactory();
ICriteria criteria = qry.CreateCriteria();
criteria.Add(ef.Eq("Account.Id", account.Id.ToString()));
criteria.Add(ef.Eq("Type", "Patient"));
result = criteria.List<IContact>();
I assumed it was just criteria.Add(ef.Ne("Type", Patient)); but its not working and the member descriptions in the API are not there.
Any Suggestions?
Solved! Go to Solution.
01-05-2010 12:36 PM
Well to answer my own question, it works unless the type is NULL, which it wasn't handling.
02-22-2010 01:55 PM