Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/EFCore/Metadata/Internal/InternalForeignKeyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3309,9 +3309,7 @@ private InternalForeignKeyBuilder MergeFacetsFrom(Navigation newNavigation, Navi

if (configurationSource != ConfigurationSource.Explicit
&& (shouldResetToPrincipal || shouldResetToDependent)
&& (navigationToPrincipal == null
|| navigationToPrincipal.Value.IsNone()
|| navigationToDependent?.IsNone() != false)
&& (navigationToPrincipal?.Name is null || navigationToDependent?.Name is null)
&& candidateRelationship.Metadata.DependentToPrincipal != null
&& candidateRelationship.Metadata.PrincipalToDependent != null
&& ((!candidateRelationshipInverted
Expand Down
3 changes: 3 additions & 0 deletions src/EFCore/Metadata/MemberIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Reflection;

namespace Microsoft.EntityFrameworkCore.Metadata
Expand Down Expand Up @@ -46,6 +47,8 @@ private MemberIdentity(object? nameOrMember)
/// Checks if the identity is empty, as opposed to representing a member.
/// </summary>
/// <returns> <see langword="true" /> if the identity is empty; <see langword="false" /> otherwise. </returns>
[Obsolete("Compare Name to null")]
[MemberNotNullWhen(false, nameof(Name))]
public bool IsNone()
=> _nameOrMember == null;

Expand Down