views:

557

answers:

1

I am considering using ADO.Net Data Services in a project for the purpose of getting data over to a Silverlight client. I'd like to use the Data Services with my existing Linq To Sql classes and designer. I probably could regenerate everything as ADO.Net entity objects, but I feel this would be a bad design for DRY reasons.

I'm new to ADO.Net Data services, so I've been reading up on it, but most of the articles I'm finding are pre-release so I've a got a few questions.

First, I've read that while you can use the data services with Linq to Sql, you can only use them for reading data, but not writing. Is this still the case?

Second, I want to have permissions so only certain users can view certain tables. I'm using a custom permission system that goes beyond Asp.net Membership and Roles. Does ADO.Net Data Services provide a way to custom authorize access?

+1  A: 

1) Yes, at this time, ADO.net only has an implementation of IUpdateable for Entity Framework. but I'm pretty sure you can find free implementations out there for LinqToSQL (that's one of the first thing quite a few people did)

2) You can easily apply whateverauhtorization scheme you need by filtering down (or simply refusing access to) a given set through "QueryInterceptors". These are basically methods on your service that are applied whenever someone sends a query for a given set. That way you can apply a more restrictive filter based on the user's rights, or simply raise an exception

Denis Troller
Thanks for your quick help!
grimus