When I include my entity model into my solution, I see error 3007.
I discovered these links:
Regarding this error:
Error 1 Error 3007: Problem in Mapping Fragments starting at lines 89, 94: Non-Primary-Key column(s) [Person_ID] are being mapped in both fragments to different conceptual side properties - data inconsistency is possible because the corresponding conceptual side properties can be independently modified.
Their Response: I concur with their conclusion that my issue may be resolved by just eliminating the Scalar Property Person ID and leaving the Navigation Property. My database is built dynamically, and my entity is often modified, therefore this is not very scalable. I don't want to always having to clean up my entity after updates.
My inquiry: Is it possible to remedy the issue by altering how EF creates the entity? Or is it possible to get rid of the scalar property using code? Maybe there are even a couple choices that I am missing.
My EF v1 experience is comparable to yours. You must manually change the EDM if it was created erroneously and there is no way to fix it. The "Code Only" Entity Data Models will be supported by EF v.Next (Entity Framework v4 I think), and the EDM designer is said to be much better. We should all benefit from some kind of improvement. Before then...
To address your issue, try removing the foreign property column from the entity set using entity model design.
We have two tables, customer and order, and we established associations between customers and orders using entity model architecture. When we complete this using Ado.net entity framework, I will add navigation properties to both of the following tables.
Similar to Customer.Orders, here's an order list for Customers.Order.
Therefore, we must delete the property from the Order entity set with the name CustomerId[Foreign key column].