在用.net core 时,
paramsIds 为上万条数组
修改前:
var pContext = context as tContext; List<TableEntity> list = pContext .Set<TableEntity>() .Where(o => paramsIds.Contains(o.Id)) .ToList();
会报 耗尽内部资源错误,
修改后:
var data = from a in pContext.Set<TableEntity>() join b in paramsIds on a.Id equals b select a;
不会报错了