mspnp / performance-optimization

Guidance on how to observe, measure, and correct common issues in a cloud-based system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"unnecessary rows" controller is not comparing similar queries

bennage opened this issue · comments

In UnnecessaryRowsController,

                var salesPersons = await context.SalesPersons
                    .Include(sp => sp.SalesOrderHeaders) // This include forces eager loading.
                    .ToListAsync();

should match

                var query = from sp in context.SalesPersons
                            from soh in sp.SalesOrderHeaders
                            select soh.TotalDue;

@bennage - Let's discuss this tomorrow. Thanks.

As discussed in standup, I'll fix this and re-run the tests.

The code has been updated and tests have been re-ran. The documentation still needs to be updated to reflect the changes. @JohnPWSharp - Please update the docs. Thanks!

Did I close this by merging the pr? 😕

Yes, since I said "fixes" with the issue number.

Reopening until docs are updated.

The doc looks updated to me.