I am using Visual Studio 2012 and i have created a .sdf and .edmx for my database. I was wondering what would be the best way to set the relationships between the entities. I have tried just setting the association with the multiplicity set and get an error saying that they are not mapped. Also how do you set the foreign keys. I am trying to create a estate agent like system to book appointments online and in branch. I am creating it in C#.

有帮助吗?

解决方案

I Assume you are going Database first. If so, if you just simply creat your foreign keys and constraints in your database and then try to add your entities again, then your edmx file will have the relationships and everything.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top