The method is designed for retrieving an entity collection by specified criteria.
function GetEntities<T: TMappedEntity>(const Condition: TExpression): IEntityEnumerable<T>; overload;
The method returns a collection of entities of the specified class type selected by the specified conditional expression. Collection members created by this method are initially attached to the data context and placed to the object cache, therefore you can already perform modification operations for them: TCustomEntityContext.Delete, TCustomEntityContext.Save, TCustomEntityContext.Cancel without pre-calling TCustomEntityContext.Attach. In addition, these entity instances will be automatically destroyed, and there will be no need to provide for their manual destruction.
Examples of calling the method:
var EmpType: IMetaType; EmpEntities: IEntityEnumerable<TEmp>; begin EmpType := Context['Emp']; EmpEntity := Context.GetEntities<TEmp>(EmpType['Sal'] > 1000); // ... end;