There is a web-application that works with Business Logic Layer (BLL). The BLL gets data from the Data Access Layer (DAL). The DAL gets data from DB through and does custom mapping.
At the moment it is required to add into the web application some functionality that will be Silverlight-based. It is planned to use .NET RIA Services for this purpose.
In the demo-video (http://silverlight.net/learn/videos/all/net-ria-services-intro/) things are very well explained:
I guess it is clear that it will be not a very good idea to start EF usage as data context in my case: this approach will require to work with the DB data directly skipping DAL and BLL logic.
Any other ideas or thoughts are welcome.
Thanks.
RIA Services isn't coupled to Entity Framework. You can use any DAL, including one of your own.
Specifically, instead of deriving from LinqToEntitiesDomainService, start by deriving from DomainService. You can write your query, insert, update, delete methods (depending on which ones you need), and in their implementation call out into the DAL.
The entity types can be POCO types - all they need at minimum is a one or more members marked as a [Key].
This should be enough to get you started.
Depending on your scenario this might suffice. If you've got a more sophisticated DAL, you could even create a DomainService base class customized for your DAL. Some of the reasons to do so: 1. Want to provide DAL-specific implementation of PersistChangeSet (to commit a bunch of changes to the DAL) 2. Want to translate DAL-specific metadata into DAL-agnostic metadata. Say you have a DAL-specific way of identifying what are key members, association members etc. and you want to convert DAL metadata into the equivalent [Key], [Association] etc. metadata.
Hope this helps.