views:

245

answers:

1

I have Silverlight application using NHibernate as a ORM. I have projects for Data(mapp and entities), data access and Silverlight. I want to add to SL project reference to data access to execute methods, but SL can only get reference from other SL project.

How can I omit it? If I host data access project on WCF I could reference WCF to SL?

Please help ! :)

+2  A: 

Yes, you can expose your data access assembly as a bunch of WCF services and then call them from the SL application.

There is also another way - make a Silverlight class library, and then add new linked files to it - those linked files being the class files from your data access assembly.

Here is a previous answer that explains the linking, although you should note that because your data access classes will now being using the Silverlight runtime you may not have access to all the System namespaces that you want (although you can pick and choose what files you want to add to the new project, and refactor the ones that don't work because of this).

slugster
I see link.I think that WCF is better way, cause my file is depending from other files and dlls, so I can't just link it, better have it all in WCF project. Thx ;)
netmajor