public string MatchIdV3(string v3Id) { (string scryfallId, string name) = _repo42.GetById(v3Id); if (scryfallId == default && name == default) { _log.Error($"No v3 card found by id {v3Id}"); return(null); } var id = CardId.Generate(scryfallId, name); if (!_repo.CardsById.ContainsKey(id)) { if (_repo.CardsByName.TryGetValue(name, out var cards)) { return(cards[0].Id); } _log.Error($"No card found by id {id}"); return(null); } return(id); }