public static bool IsStrictlyDerivedFrom([NotNull] this IReadOnlyEntityType entityType, [NotNull] IReadOnlyEntityType baseType) { Check.NotNull(entityType, nameof(entityType)); Check.NotNull(baseType, nameof(baseType)); return(entityType == baseType ? false : baseType.IsAssignableFrom(entityType)); }
public static IReadOnlyEntityType?LeastDerivedType([NotNull] this IReadOnlyEntityType entityType, [NotNull] IReadOnlyEntityType otherEntityType) { Check.NotNull(entityType, nameof(entityType)); Check.NotNull(otherEntityType, nameof(otherEntityType)); return(entityType.IsAssignableFrom(otherEntityType) ? entityType : otherEntityType.IsAssignableFrom(entityType) ? otherEntityType : null); }