Which code segment should you use?

You are adding a new REST service endpoint to the FlightDataController controller. It returns flights from the
consolidated data sources only for flights that arelate. You need to write a LINQ to Entities query to extract the
required data. Which code segment should you use?

You are adding a new REST service endpoint to the FlightDataController controller. It returns flights from the
consolidated data sources only for flights that arelate. You need to write a LINQ to Entities query to extract the
required data. Which code segment should you use?

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
D is right because you send result as REST so if you use “AsQueryable” the result is deferred to the next
enumeration of your result.
D is not optimized but will works.
A will break at runtime.



Leave a Reply 0

Your email address will not be published. Required fields are marked *