0

We have determined that if you have two entities that are related and then you leave the default navigation properties between them (one pointing to the other and back), then saving Entity data is not possible. Only one navigation property can be kept.

For example:

ENTITY:USER
Property.UserId
NavigationProperty.Favorites
_
ENTITY:FAVORITE
Property.FavoriteId
Property.URL
Property.UserFk
NavigationProperty.Users

Does anyone know of an easy way to detect these circular navigation properties? I know one way is to look for them by hand - we're doing that, but we have hundreds of entities in our EDMX and "manual" approach is proving to not be a realiable option.

Thanks.

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233

1 Answers1

1

We have determined that if you have two entities that are related and then you leave the default navigation properties between them (one pointing to the other and back), then saving Entity data is not possible. Only one navigation property can be kept.

You have determined it wrong - saving entities works without any problem. The only scenario where this cause problems is serialization where it can be solved for some serializers with additional metadata.

Community
  • 1
  • 1
Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670