Is it possible to make a custom QueryInterceptor in a WCF Data Service on all entites instead of only one? This is a standard QueryInterceptor:
[QueryInterceptor("Products")]
public Expression<Func<Product, bool>> OnQueryProducts()
{
var user = HttpContext.Current.User;
if (user.IsInRole("Administrator"))
return (Product p) => true;
else
return (Product p) => false;
}
I like to do something like this:
[QueryInterceptor("*")]
public Expression<Func<Object, bool>> OnQueryProducts()
{
var user = HttpContext.Current.User;
if (user.IsInRole("Administrator"))
return (Object p) => true;
else
return (Object p) => false;
}
Is there any way or do I have to integrate one inceptor for all of my entities?