public static IReadOnlyNavigation?FindDefiningNavigation([NotNull] this IReadOnlyEntityType entityType) { if (!entityType.HasDefiningNavigation()) { return(null); } var definingNavigation = entityType.DefiningEntityType !.FindNavigation(entityType.DefiningNavigationName !); return(definingNavigation?.TargetEntityType == entityType ? definingNavigation : null); }
public static bool HasDefiningNavigation([NotNull] this IReadOnlyEntityType entityType) => entityType.HasDefiningNavigation();