diff --git a/src/ef/Commands/MigrationsHasPendingModelChangesCommand.cs b/src/ef/Commands/MigrationsHasPendingModelChangesCommand.cs index bdbd2db8b6a..f552a82ce37 100644 --- a/src/ef/Commands/MigrationsHasPendingModelChangesCommand.cs +++ b/src/ef/Commands/MigrationsHasPendingModelChangesCommand.cs @@ -1,12 +1,20 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using Microsoft.EntityFrameworkCore.Internal; +using Microsoft.EntityFrameworkCore.Tools.Properties; + namespace Microsoft.EntityFrameworkCore.Tools.Commands; internal partial class MigrationsHasPendingModelChangesCommand { protected override int Execute(string[] args) { + if (new SemanticVersionComparer().Compare(EFCoreVersion, "8.0.0") < 0) + { + throw new CommandException(Resources.VersionRequired("8.0.0")); + } + using var executor = CreateExecutor(args); executor.HasPendingModelChanges(Context!.Value());