且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

实体框架4.1代码优先的方式创建许多一对多的关系

更新时间:2022-11-04 22:54:57

我觉得这里的问题在于WCF RIA服务,没有什么EF相关。也就是说,WCF不喜欢的接口。解决办法是使用收藏而不是的ICollection 的。我敢肯定,EF不会介意它,它会解决您的WCF问题。

I think problem here lies in the WCF RIA service, not anything EF related. That is, that WCF doesn't like interfaces. Solution would be use Collection instead of ICollection. I'm sure EF won't mind it and it will fix your WCF problem.

修改:这可能会解决你的问题的 http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/d894c8af-5985-4995-88e2-c8733e4a51ea

Edit: This may solve your problem http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/d894c8af-5985-4995-88e2-c8733e4a51ea