I have a big dictionary and a list (myList). I want to keep the items in myList only if there is an item in my dictionary with the same Title. The problem is that the initialisation of titleList takes long time (2-3 sec). Is there any better way to do that?
var dictionary = r.MyFunction.Where(a condition);
var titleList = dictionary.Select(x => x.Value.Title).ToList()
myList = productsTemp.Where(x => titleList.Contains(x.Title)).ToList();