Developing Microsoft Azure and Web Services — Question 69

You are developing an ASP.NET MVC application that displays a report. The report includes large images that are stored in a database. Members of the
EntityClient namespace are used to access the database through the ADO.NET Entity Framework data model.
You need to prevent memory exceptions while generating a report using the EntityDataReader type.
Which CommandBehavior type should you use?

Answer options

Correct answer: A

Explanation

The correct answer is A, SequentialAccess, as it allows for reading data sequentially, which is more memory efficient for large datasets. The other options, such as SingleRow and SingleResult, do not provide the same level of memory efficiency, while FastForwardReadOnly is limited to read-only access without sequential benefits.