You are writing a WCF data service that will be included in a large project that has many other WCF data services. Your WCF data service will provide access to a SQL server using the EF. The EDMX file already exists in the project and is used by other services. One of the tables exposed by your service is the Contacts table, which contains the list of employees and the list of external contacts, which are denoted by the IsEmployee column that can be set to 1 or 0.

You want to configure your WCF data service to return the external contacts whenever someone queries the Contacts entity set through WCF Data Services.

What is the best way to solve this problem?

 Posted by Rajkatie on 8/6/2012 | Category: ADO.NET Interview questions | Views: 4512 | Points: 40
Select from following answers:
  1. Modify the Contacts entity set in the EDMX file.
  2. Add a stored procedure to SQL Server and modify the EDMX file to create a function import that you can call.
  3. Add a lazy loader to the WCF data service that will filter out the employees.
  4. Add a method to your WCF data service class and adorn the method with a QueryInterceptorAttribute of Contacts. In the method, provide the filter.
  5. All Above

Show Correct Answer


Source: MeasureUp.com | | Alert Moderator 

Comments or Responses

Login to post response