Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public static bool HasDefiningNavigation([NotNull] this IReadOnlyEntityType entityType)
 => entityType.HasDefiningNavigation();