2013-10-10 39 views
0

我與這些列我可以更改生成的FooReference屬性的名稱嗎?

  • FooId(FK,INT,不爲空)
  • FooReference(nvarchar的,NULL)

拉這個表到一個數據庫,第一模型生成一個表錯誤:

The NavigationProperty 'Foo' on the type 'Bar.Baz' is the source of a generated property 'FooReference' which conflicts with a member of the same name.

據我所知,導航屬性導致FooReference財產產生。有沒有辦法更改該屬性的名稱,或者我將不得不修改數據庫?

回答

1

你可以只在產生EDMX模型

enter image description here

重命名FooReference到FooReference1(或任何你喜歡)
相關問題