This is a migrated thread and some comments may be shown as answers.
Best practice ADO.NET Dataservice
1 Answer 37 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Henk
Top achievements
Rank 1
Henk asked on 02 Nov 2009, 02:07 PM
Hello,

If I build an ADO.NET dataservice using the OA WCF wizard the OA classes from my model are available in the ADO.NET dataservice.
If I want to add an extra filter to the query, based on for instance the user role, when using the ADO.NET dataservice I can write a query interceptor. That's no problem. But what to do when I do not want to expose all the fields of the class?
In one application based on my OA model I want to use all the fields of the class mapped to the columns of the database table.
In my ADO.NET Dataservice I do not want to expose all the fields of the classes.
What's the best place to define the fields which are exposed in the ADO.NET Dataservice?

1 Answer, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 05 Nov 2009, 01:44 PM
Hello Henk Boen,

There is no way to expose just some desired fields out of the box. As a workaround though, I could suggest you make a hierarchy for the classes that you do not want fully exposed on the client side of the ADO .NET Dataservice. In that case you can put the fields you want exposed in the base class and the rest in the derived class. That way you can manipulate the visibility of your fields in different scenarios.

Kind regards,
Zoran
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Henk
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Share this question
or