From 993d0f13298bd590679234a3733106fa559dd2f3 Mon Sep 17 00:00:00 2001 From: Brice Lambson Date: Mon, 14 Jun 2021 14:28:14 -0700 Subject: [PATCH] Make IScaffoldingModelFactory public Fixes #23049 --- .../Scaffolding/IScaffoldingModelFactory.cs | 22 ++++++++++++++++ .../Internal/IScaffoldingModelFactory.cs | 25 ------------------- .../RelationalDatabaseModelFactoryTest.cs | 1 - 3 files changed, 22 insertions(+), 26 deletions(-) create mode 100644 src/EFCore.Design/Scaffolding/IScaffoldingModelFactory.cs delete mode 100644 src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs diff --git a/src/EFCore.Design/Scaffolding/IScaffoldingModelFactory.cs b/src/EFCore.Design/Scaffolding/IScaffoldingModelFactory.cs new file mode 100644 index 00000000000..c8a1f035403 --- /dev/null +++ b/src/EFCore.Design/Scaffolding/IScaffoldingModelFactory.cs @@ -0,0 +1,22 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. + +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; + +namespace Microsoft.EntityFrameworkCore.Scaffolding +{ + /// + /// Used to create an from a . + /// + public interface IScaffoldingModelFactory + { + /// + /// Creates an from a . + /// + /// The database model. + /// The options to use while creating the model. + /// The model. + IModel Create(DatabaseModel databaseModel, ModelReverseEngineerOptions options); + } +} diff --git a/src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs b/src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs deleted file mode 100644 index f60358421e4..00000000000 --- a/src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to - /// the same compatibility standards as public APIs. It may be changed or removed without notice in - /// any release. You should only use it directly in your code with extreme caution and knowing that - /// doing so can result in application failures when updating to a new Entity Framework Core release. - /// - public interface IScaffoldingModelFactory - { - /// - /// This is an internal API that supports the Entity Framework Core infrastructure and not subject to - /// the same compatibility standards as public APIs. It may be changed or removed without notice in - /// any release. You should only use it directly in your code with extreme caution and knowing that - /// doing so can result in application failures when updating to a new Entity Framework Core release. - /// - IModel Create(DatabaseModel databaseModel, ModelReverseEngineerOptions options); - } -} diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalDatabaseModelFactoryTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalDatabaseModelFactoryTest.cs index 31da5d10b8c..4290d586dbd 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalDatabaseModelFactoryTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalDatabaseModelFactoryTest.cs @@ -8,7 +8,6 @@ using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Scaffolding; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; using Microsoft.EntityFrameworkCore.TestUtilities;