0

Should I keep all navigation properties that Entity generated or just keep only these I really want ?

For example :

  • I've 2 entities : Location (Id, Code, Name, IdType) and Location type (Id, Code, Name).
  • Entity generates a "Type" property for the entity "Location" and "Locations" property (collection) for the entity "Location type".

If I'd built my model myself, I'd created the first, but probably not the second. So should I keep it or delete it?

Maybe it's like the “Include foreign key column in the model” option. In my opinion, I don't see the utility of this, this even seems to me to be contrary to the development logic. However, I read here that I should let it checked.

Community
  • 1
  • 1
Corabox
  • 157
  • 10
  • 1
    Navigation properties are just to establish relationships in your queries between the tables in the database. If you are certain you are not going to use the relationship in this direction ever, you can delete it. However, more Navigation properties don't hurt you (as long they are properly configured) – DevilSuichiro Sep 02 '15 at 13:43

1 Answers1

0

Finally I decided to keep them. Like DevilSuichiro said, "more Navigation properties don't hurt". So maybe I'll never use them, but if I have to, I'll be happy not to remove them !

Community
  • 1
  • 1
Corabox
  • 157
  • 10