public IList <EntityRecord> ExecuteSelect(EntitySession session, EntityCommand command, object[] args) { IList <EntityRecord> records; if (Cache != null && Cache.TryExecuteSelect(session, command, args, out records)) { return(records); } records = Database.ExecuteSelect(session, command, args); if (Cache != null) { Cache.CacheRecords(records); } return(records); }