0

I have tried several guides I find online, and nothing seems to work. I am trying to follow this guide, Setting up a new Silverlight 4 Project with WCF RIA Services, but when I try and add a Domain Services class to the RIA x.Web project, I get an error about an index dialoguie out of range etc. Google reveals this is maybe because VS can't find a connection string, although I have added one in App.config.

Then, if I try and add the DS class directly into my Silverlight host, bypassing teh RIA project, I get the same error, until I add an App.Config. After that, I can proceed an iota further, and I get to choose my DbContext and select a few entity classes to include in the DS class. But then I get an unspecified error.

Maybe something code-first specific? I find a NuGet package for CodeFirst EF and RIA, RIAServices.EntityFramework, but it doesn't support EF 4.3. I am going to try and duplicate my model in a dirty old edmx model and see.

Has anyone had any success doing any of this in VS 2012?

4

1 回答 1

0

您应该将连接字符串添加到 Web.Config 而不是 App.config

于 2012-07-20T09:00:10.653 回答