PrepAway - Latest Free Exam Questions & Answers

How should you build the method?

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

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?

PrepAway - Latest Free Exam Questions & Answers

Answer:

Explanation:

2 Comments on “How should you build the method?

  1. Jules says:

    [QueryInterceptor(“Orders”)]
    public Expression<Func> FilterOrders()
    {
    return o => o.Customer.Name == /* Current principal name. */;
    }

    // Insures that the user accessing the customer(s) has the appropriate
    // rights as defined in the QueryRules object to access the customer
    // resource(s).

    [QueryInterceptor (“Customers”)]
    public Expression<Func> FilterCustomers()
    {
    return c => c.Name == /* Current principal name. */ &&
    this.CurrentDataSource.QueryRules.Contains(
    rule => rule.Name == c.Name &&
    rule.CustomerAllowedToQuery == true
    );
    }




    0



    0

Leave a Reply