Question

I have a problem with edmx desginer. I have one table (Comment) and one view (User). I want to add association between them, UserId in Comment. When I'm doing it I get additional column in Comment - UserId1. And after that i have error, that UserId1 is not mapped. What is wrog here?

Was it helpful?

Solution

When you get the add new association dialog there is an option selected called "Add foreign key properties to the 'your entity name' Entity". Make sure you deselect this option.

You'll also probably need to set up Referential Constraint in the associations properties panel - this is what EF uses to use the association in your navigation properties.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top