public VaultKeyInfo ExportKey(Database db = null) { db = db ?? Database; VaultKey key = VaultKeysByVaultId.FirstOrDefault(); _items = null; VaultKeysByVaultId.Delete(db); ChildCollections.Clear(); VaultKeyInfo result = key.CopyAs <VaultKeyInfo>(); return(result); }