0

I am asking the same question in a different way in hopes I can get a few ideas this time.

My Silverlight uses RIA Services and Entity Framework. I have a tree control on my UI with any number of nodes. Each node is a project and the data for that project could be on one of many servers. The database is also unique to that project.

When the users selects a node, I know what server and database the info is on, but how do I dynamically create the connection string used by the DomainService?

I have tried everything I can think of. It seems as though because I cannot keep my connection strings in my web.config file, I cannot use Entity Framework.

Thanks in advance...

-Scott

2
  • What does prevent you from using WCF services through SOAP? Or WCF Data Services? I worked with them and these technologies allow using a server adress as a constructor parameter. Commented Dec 4, 2010 at 23:48
  • It gets a bit more complicated when using Ria services. The DomainService gets converted to a DomainContext on the client side. The DomainService allows 3 constructors and that's it. Because it gets related to the client via generated code, there is no way to add a constructor. Also, the CreateObjectContext in the DomainService gets called the very first time you reference the DomainService. This is the last chance to make changed to the connection string. I did find a solution that I am posting below. Commented Dec 5, 2010 at 6:59

1 Answer 1

0

I was able to find a solution to my problem. I posted it on another version of the same question here: Silverlight Entity Framework Dynamic Connection String

-Scott

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.