Genpact Cora Knowledge Center


Use the AsQueryable Method in an Expression

When you use the AsQueryable attribute in an expression, the query is executed at the database level (rather than in memory). Use this attribute when dealing with tables without a key, or when handling a high volume of records. 

Note: Using this method might affect system performance.

Example of Expression with the AsQueryable Method

{activity}.Query("QueryWithoutSystemKeys").AsQueryable().First(Field("fldIWfId") == wf.WorkflowInstanceId).Field("Field1")