Convenience for querying a subset

Posts   
 
    
tmatelich
User
Posts: 95
Joined: 14-Oct-2009
# Posted on: 31-Mar-2010 18:48:42   

Is there a convenient function for querying whether a field matches one of a set of values?


void DeleteUsersEntriesRelatedToFiles(string username, List<string> filenames)
{
   using (DataAccessAdapter adapter = Create.Adapter(conn))
   {
      RelationPredicateBucket B = new RelationPredicateBucket();
      IPredicateExpression A = new PredicateExpression();
      A.Add(EntryFields.User == username);
      //how to add filenames?  Do I have to iterate and call addwithor?

      B.PredicateExpression.Add(A);
      adapter.DeleteEntitiesDirectly(typeof(ReportEntryEntity), B);
   }    
}

Thanks

tmatelich
User
Posts: 95
Joined: 14-Oct-2009
# Posted on: 31-Mar-2010 19:02:43   

Ahh, there it is. Found FieldCompareRangePredicate