I have this data :
public class MetaLink
{
public long LinkNumbering { get; set; }
public long TargetPageId { get; set; }
public string TargetUrl { get; set; }
public LinkType LinkOfType { get; set; }
}
public static ConcurrentDictionary<int, List<MetaLink>> Links = new ConcurrentDictionary<int, List<MetaLink>>();
How can I obtain all index of MetaLink
object in the list dictionnary values and the correspondig dictionnary key with TargetUrl
property == "Some value"
Perhaps is possible with Linq, but I don't find it. I do this :
var someLinks = Links.Values.Where(kvp => kvp.Any(ml => ml.TargetUrl == "Some value"));
But I can't get the correspondig dictionnary int key