protected void LoadAllEntriesMetadata()
 {
     using (OSTrace.Timer("StaticEntityRuntime.LoadAllEntriesMetadata: Loading metadata for " + ObjectKeyUtils.DatabaseValue(EntityKey) + ".")) {
         using (Transaction tran = DatabaseAccess.ForSystemDatabase.GetReadOnlyTransaction()) {
             using (IDataReader reader = DBRuntimePlatform.Instance.GetStaticRecordsByEntity(tran, EntityKey, EspaceId)) {
                 int count = 0;
                 while (reader.Read())
                 {
                     StaticRecordMetadata record = newStaticRecord();
                     record.Read(reader);
                     AddToMetadataCache(record);
                     count++;
                 }
                 OSTrace.Debug("StaticEntityRuntime.LoadAllEntriesMetadata: Loaded " + count + " metadata records.");
             }
         }
     }
 }