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.
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.
RIA services...i beleive everyone somehow got it to work, but is it organized, is it simple (hummmm) ,are you confortable the way you did solve it all the pieces, well then you are like me, reading everywhere and having some idea, but after few months found this GREATE link ENJOY! http://blogs.msdn.com/b/kylemc/archive/2011/04/29/mvvm-pattern-for-ria-services.aspx thanks to Kyle McClellan for putting it together and J. Papa and others
then READ IT AND SEE IF IT HELPS a bit. I think it does. Happy coding to you all RIA newbies (and no newbies Don't you agree?)
精彩评论