Getting Error 3007 when I add my Entity Model

前端 未结 2 1133
萌比男神i
萌比男神i 2021-01-02 20:08

I am getting an error 3007 when I add my entity model to my solution.

I found these links:

Good explination

Short answer

About this error:

相关标签:
2条回答
  • 2021-01-02 20:49

    Try to remove foreign property column from Entity set using entity model design it will solve your problem

    For example

    We have two tables one is customer and other one is order, using entity model design we added association between customers and orders when we do this Ado.net entity framework i will add navigation properties to both below tables.

    Like Customer.Orders - Here order is list Order.Customer

    One - Many relation.

    So we need to remove property from with name CustomerId[Foreign key column] from Order entity set.

    For reference:

    http://social.msdn.microsoft.com/forums/en-US/adodotnetentityframework/thread/2823634f-9dd1-4547-93b5-17bb8a882ac2/

    0 讨论(0)
  • 2021-01-02 21:00

    My experience with EF v1 is similar to yours. When the EDM is generated incorrectly and you can't work around the issue, you have to manually edit the EDM. EF v.Next (Entity Framework v4 I believe) will support "Code Only" Entity Data Models, and the EDM designer is supposed to be much better. One or the other improvement should make our lives easier. Until then...

    0 讨论(0)
提交回复
热议问题