我提取的是一个大集合(35k + - 产品列表)
for each item_cache in products_cache
list.Add(New Products With {
.product_id = item_cache.id,
.product_name = item_cache.name,
.moreHere = item_cache.moreHere,
.moreHere = item_cache.moreHere,
.moreHere = item_cache.moreHere,
.moreHere = item_cache.moreHere
})
next
return list.Tolist
我们目前拥有的参数都是字符串(home.aspx?p_name ='Shirts')。
获得列表集后,搜索字符串或搜索索引是否更好?
return list.where(function(c) c.product_name = 'Shirts')
或者我应该首先检索字符串的索引(PK)
Dim p_id As Integer = dataGetIdOfProduct('Shirts')
return list.where(function(c) c.product_id = p_id)