Sanjay Sharma

Sanjay Sharma

  • 1.2k
  • 409
  • 25.3k

Contains performance

Jun 26 2019 7:00 AM
Hi,
 
I have following code
 
int [] selectedPocilies = {1,2,3,...................10000};
var PolicyData = commonDAL.GetPolicyData(); // policy records
//Below statement took time
var FilteredPolicyData = PolicyData.Where(p => SelectedPolicies.Contains(p.PolicyId)).ToList();
 
Is there anyway to reframe above code line.
Thanks in advance

Answers (1)