Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RIA Services and the generic Repository pattern

I'm working on a Silverlight project that uses RIA Services.

My question is that I can use generic repository pattern with RIA Services on the client side?

What is the best practice how I should organize the RIA Services method on the cilent side?

l.

like image 908
user295541 Avatar asked Nov 14 '22 06:11

user295541


1 Answers

When I first saw WCF RIA Services it struck me that it would be fantastic to be able to expose an underlying data structure like LINQ to SQL via a Repository Pattern, but this will not work because the underlying transport mechanism of WCF does not allow for a schema type supporting generics. Everything must be concrete classes.

That being said ... this thread does include a way to work around the problem:

http://forums.silverlight.net/forums/t/223006.aspx

I find it to not be very useful given the real benefits of WCF RIA Services: business rules propagating to the client, IQueryable client-side support, and the ability to quickly expose JSON/REST, SOAP, and OData enpoints.

like image 160
Keith Adler Avatar answered Dec 21 '22 20:12

Keith Adler