문제

I have a table with these columns

  • FooId (FK, int, not null)
  • FooReference (nvarchar, null)

Pulling this table into a database-first model generates an error:

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.

From what I understand, the navigation property causes a FooReference property to be generated. Is there a way to change the name of that property, or will I have to modify the database?

도움이 되었습니까?

해결책

You can just rename FooReference to FooReference1 (or whatever you like) in the generated edmx model

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top