PrepAway - Latest Free Exam Questions & Answers

Which CommandBehavior type should you use?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
SequentialAccess

B.
SingleRow

C.
SingleResult

D.
FastForwardReadOnly

Explanation:
SequentialAccess provides a way for the DataReader to handle rows that contain columns with large binary
values. Rather than loading the entire row, SequentialAccess enables the DataReader to load data as a stream.
You can then use the GetBytes or GetChars method to specify a byte location to start the read operation, and a
limited buffer size for the data being returned.


Leave a Reply