views:

26

answers:

0

I'm using the Model First approach with EF 4 and hit a snag with two tables, Participant (singular because pre-existing from another app) and ActiveParticipants.

A Participant may or may not be associated with exactly one ActiveParticipant and vice versa.

When I create an association, everything seems to go well on the surface, but then I get a runtime error complaining that Participant does not contain the column ActiveParticipant_Id. It does contain a column ActiveParticipantId (no underscore).

When I view the diagram as XML, there's a line like this:

<Property Name="ActiveParticipant_Id" Type="uniqueidentifier" Nullable="true" />

Why is it adding an underscore? Is there anything special I need to do for 0:1, 0:1 relationships?