Date: 2015-10-02 02:56 pm (UTC)
> Weird idea to issue 10k queries for retrieving 10k records.

Would do you mean "weird idea"? That's how lazy references work. Be careful what you are wishing for :)


var auditRecords = myLog.GetAudit(); // gets 10K audit records

foreach (var record in auditRecords) // loops 10K times
{
var user = record.User; // a lazy reference
if (user.IsAdmin) ... // causes "user" to be instantiated from DB via query
}



This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

July 2025

S M T W T F S
  12345
6789 1011 12
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 13th, 2025 01:18 pm
Powered by Dreamwidth Studios