exam questions

Exam 70-487 All Questions

View all questions & answers for the 70-487 exam

Exam 70-487 topic 1 question 3 discussion

Actual exam question from Microsoft's 70-487
Question #: 3
Topic #: 1
[All 70-487 Questions]

DRAG DROP -
You are developing a WCF Data Services service in Visual Studio to display movie information from a SQL Server database that changes every 24 hours. The service is defined in the following class.

The application contains the following Entity Framework model.

The service must only return data for movies that are currently in theaters.
You need to add a method to the MovieService class to filter the data.
How should you build the method? (To answer, drag the appropriate code segments to the correct location or locations in the answer area. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
Query interceptor methods, which are called when processing an HTTP GET request, must return a lambda expression that determines whether an instance of the interceptor's entity set should be returned by the query results. This expression is used by the data service to further refine the requested operation. The following is an example definition of a query interceptor.
// Define a query interceptor for the Orders entity set.
[QueryInterceptor("Orders")]
public Expression<Func<Order, bool>> OnQueryOrders()
References:
https://docs.microsoft.com/en-us/dotnet/framework/data/wcf/interceptors-wcf-data-services

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
zimzimzimma
4 years, 8 months ago
Why not "MovieEntities" ?
upvoted 1 times
zimzimzimma
4 years, 8 months ago
Never mind, it's "Movies" as the entity set name in the access rule declaration.
upvoted 1 times
...
...
sscooter1010
5 years, 4 months ago
Objective 1.5
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...