Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Optimize DDS linq query.

$
0
0

HI,

I need suggestions to optimize below linq query.

store.Items<StorageMessage>().ToList()
.Where(x => x.Recipients.Select(y => y.Code).Contains(testCode))
.OrderByDescending(x => x.DateCreated)
.ToList();

the use of ToList() is affecting performance and sometimes results in timeout error.

we tried to apply where condition on store directly but getting different results.

Any Suggestions? 


Viewing all articles
Browse latest Browse all 9076

Trending Articles