Skip to content

Commit

Permalink
Don't remove the annotation in NonNullableConventionBase
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriySvyryd committed Nov 20, 2024
1 parent cda7816 commit c2cf429
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/EFCore/Metadata/Conventions/NonNullableConventionBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.EntityFrameworkCore.Metadata.Conventions;
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-conventions">Model building conventions</see> for more information and examples.
/// </remarks>
public abstract class NonNullableConventionBase : IModelFinalizingConvention
public abstract class NonNullableConventionBase
{
/// <summary>
/// Creates a new instance of <see cref="NonNullableConventionBase" />.
Expand Down Expand Up @@ -63,10 +63,4 @@ protected virtual bool TryGetNullabilityInfo(

return nullabilityInfo is not null;
}

/// <inheritdoc />
public virtual void ProcessModelFinalizing(
IConventionModelBuilder modelBuilder,
IConventionContext<IConventionModelBuilder> context)
=> modelBuilder.Metadata.RemoveAnnotation(CoreAnnotationNames.NonNullableConventionState);
}

0 comments on commit c2cf429

Please sign in to comment.