Microsoft
70-516 · Question #213
A performance issue exists in the application. The following code segment is causing a performance bottleneck: var colors = context.Parts.GetColors(); You need to improve application performance by…
The correct answer is D. var colors = context.Parts.OfType<Product>(). See the full explanation below for the reasoning.
Question
A performance issue exists in the application. The following code segment is causing a performance bottleneck:
var colors = context.Parts.GetColors(); You need to improve application performance by reducing the number of database calls. Which code segment should you use?
Options
- Avar colors = context.Parts.OfType<Product>().
- Bvar colors = context.Parts.OfType<Product>().
- Cvar colors = context.Parts.OfType<Product>().
- Dvar colors = context.Parts.OfType<Product>().
How the community answered
(40 responses)- A3% (1)
- B13% (5)
- C5% (2)
- D80% (32)
Community Discussion
No community discussion yet for this question.