I am learning about ADO.NET Entity Data Models and have created a model within my VS2008
application. I added a table to the MS SQL Server database and created a foreign key constraint using the customer_id keys.
Now, when I attempt to run the attached code: the following error occurrs.
An error occurred while preparing the command definition. See the inner exception for details. NFTrendbookModel.msl(88,6)
: error 3007: Problem in Mapping Fragments starting at lines 20, 88: Non-Primary-Key column(s) [CUSTOMER_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. "
Dim context As NFTrendbookDAL.NFTrendbookEntities = New NFTrendbookDAL.NFTrendbookEntities()
Dim result = From c In context.tTrendEvents Select c
'The next line explodes the code.
For Each cc In result
Catch ex As Exception
'The Exception as noted above occurs