From d2ae3241a5509f2211e339362a68755faab5f758 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 18 May 2017 10:31:14 -0700 Subject: [PATCH 01/11] Remove IInternalDatabaseModelFactory Not useful at all. --- .../Internal/IInternalDatabaseModelFactory.cs | 22 ------------------- .../RelationalDatabaseCleaner.cs | 5 ++--- .../Internal/SqlServerDatabaseModelFactory.cs | 4 ++-- .../Internal/SqliteDatabaseModelFactory.cs | 4 ++-- .../Utilities/SqlServerDatabaseCleaner.cs | 3 ++- .../SqliteDatabaseCleaner.cs | 3 ++- 6 files changed, 10 insertions(+), 31 deletions(-) delete mode 100644 src/EFCore.Relational.Design/Internal/IInternalDatabaseModelFactory.cs diff --git a/src/EFCore.Relational.Design/Internal/IInternalDatabaseModelFactory.cs b/src/EFCore.Relational.Design/Internal/IInternalDatabaseModelFactory.cs deleted file mode 100644 index 97bce8414a7..00000000000 --- a/src/EFCore.Relational.Design/Internal/IInternalDatabaseModelFactory.cs +++ /dev/null @@ -1,22 +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 System.Data.Common; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public interface IInternalDatabaseModelFactory : IDatabaseModelFactory - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - DatabaseModel Create([NotNull] DbConnection connection, [NotNull] TableSelectionSet tableSelectionSet); - } -} diff --git a/src/EFCore.Relational.Specification.Tests/RelationalDatabaseCleaner.cs b/src/EFCore.Relational.Specification.Tests/RelationalDatabaseCleaner.cs index 73d8f9a7c2c..a195549e85c 100644 --- a/src/EFCore.Relational.Specification.Tests/RelationalDatabaseCleaner.cs +++ b/src/EFCore.Relational.Specification.Tests/RelationalDatabaseCleaner.cs @@ -7,7 +7,6 @@ using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations.Operations; using Microsoft.EntityFrameworkCore.Scaffolding; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.Extensions.Logging; @@ -16,7 +15,7 @@ namespace Microsoft.EntityFrameworkCore { public abstract class RelationalDatabaseCleaner { - protected abstract IInternalDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory); + protected abstract IDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory); protected virtual bool AcceptTable(TableModel table) => true; @@ -46,7 +45,7 @@ public virtual void Clean(DatabaseFacade facade) else { var databaseModelFactory = CreateDatabaseModelFactory(loggerFactory); - var databaseModel = databaseModelFactory.Create(connection.DbConnection, TableSelectionSet.All); + var databaseModel = databaseModelFactory.Create(connection.DbConnection.ConnectionString, TableSelectionSet.All); var operations = new List(); diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs index d552f65c767..0b67d4b6e28 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs @@ -24,7 +24,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class SqlServerDatabaseModelFactory : IInternalDatabaseModelFactory + public class SqlServerDatabaseModelFactory : IDatabaseModelFactory { private DbConnection _connection; private Version _serverVersion; @@ -100,7 +100,7 @@ public virtual DatabaseModel Create(string connectionString, TableSelectionSet t /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual DatabaseModel Create(DbConnection connection, TableSelectionSet tableSelectionSet) + private DatabaseModel Create(DbConnection connection, TableSelectionSet tableSelectionSet) { ResetState(); diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs b/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs index abeffa0a4d5..b7075a61615 100644 --- a/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs +++ b/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs @@ -22,7 +22,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class SqliteDatabaseModelFactory : IInternalDatabaseModelFactory + public class SqliteDatabaseModelFactory : IDatabaseModelFactory { /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -78,7 +78,7 @@ public virtual DatabaseModel Create(string connectionString, TableSelectionSet t /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual DatabaseModel Create(DbConnection connection, TableSelectionSet tableSelectionSet) + private DatabaseModel Create(DbConnection connection, TableSelectionSet tableSelectionSet) { ResetState(); diff --git a/test/EFCore.SqlServer.FunctionalTests/Utilities/SqlServerDatabaseCleaner.cs b/test/EFCore.SqlServer.FunctionalTests/Utilities/SqlServerDatabaseCleaner.cs index 16fdb6dee68..3c534116b76 100644 --- a/test/EFCore.SqlServer.FunctionalTests/Utilities/SqlServerDatabaseCleaner.cs +++ b/test/EFCore.SqlServer.FunctionalTests/Utilities/SqlServerDatabaseCleaner.cs @@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Migrations.Operations; +using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.Extensions.Logging; @@ -13,7 +14,7 @@ namespace Microsoft.EntityFrameworkCore.Utilities { public class SqlServerDatabaseCleaner : RelationalDatabaseCleaner { - protected override IInternalDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory) + protected override IDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory) => new SqlServerDatabaseModelFactory( new DiagnosticsLogger( loggerFactory, diff --git a/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCleaner.cs b/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCleaner.cs index b34dceb6d4a..636cc998b5c 100644 --- a/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCleaner.cs +++ b/test/EFCore.Sqlite.FunctionalTests/SqliteDatabaseCleaner.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using Microsoft.EntityFrameworkCore.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.Extensions.Logging; @@ -11,7 +12,7 @@ namespace Microsoft.EntityFrameworkCore { public class SqliteDatabaseCleaner : RelationalDatabaseCleaner { - protected override IInternalDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory) + protected override IDatabaseModelFactory CreateDatabaseModelFactory(ILoggerFactory loggerFactory) => new SqliteDatabaseModelFactory( new DiagnosticsLogger( loggerFactory, From 7f43532360d37f5b2e671382fc8f5a85a508d494 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Fri, 19 May 2017 14:54:08 -0700 Subject: [PATCH 02/11] Negate UseFluentApiOnly and make parameter UseDataAnnotations --- .../Design/Internal/DatabaseOperations.cs | 2 +- .../Internal/CustomConfiguration.cs | 6 +++--- .../Internal/EntityConfiguration.cs | 16 ++++++++-------- .../Internal/PropertyConfiguration.cs | 8 ++++---- .../Internal/ConfigurationFactory.cs | 4 ++-- .../Scaffolding/Internal/DbContextWriter.cs | 8 ++++---- .../Scaffolding/Internal/EntityTypeWriter.cs | 4 ++-- .../ReverseEngineeringConfiguration.cs | 2 +- .../Internal/ReverseEngineeringGenerator.cs | 2 +- .../ReverseEngineering/SqlServerE2ETests.cs | 11 ++++++----- .../SqliteAllFluentApiE2ETest.cs | 2 +- ...qliteAttributesInsteadOfFluentApiE2ETest.cs | 2 +- .../ReverseEngineering/SqliteE2ETestBase.cs | 18 +++++++++--------- 13 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs index ef230501f7b..85941781f4c 100644 --- a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs +++ b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs @@ -72,7 +72,7 @@ public virtual Task ScaffoldContextAsync( ProjectRootNamespace = _rootNamespace, OutputPath = outputDir, TableSelectionSet = tableSelectionSet, - UseFluentApiOnly = !useDataAnnotations, + UseDataAnnotations = useDataAnnotations, OverwriteFiles = overwriteFiles }; diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs index 1bebc2a6196..00e3e58abee 100644 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs +++ b/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs @@ -18,7 +18,7 @@ public class CustomConfiguration /// public CustomConfiguration([NotNull] string connectionString, [CanBeNull] string contextClassName, [NotNull] string @namespace, - bool useFluentApiOnly) + bool useDataAnnotations) { Check.NotEmpty(connectionString, nameof(connectionString)); Check.NotEmpty(@namespace, nameof(@namespace)); @@ -26,7 +26,7 @@ public CustomConfiguration([NotNull] string connectionString, ConnectionString = connectionString; ContextClassName = contextClassName; Namespace = @namespace; - UseFluentApiOnly = useFluentApiOnly; + UseDataAnnotations = useDataAnnotations; } /// @@ -51,6 +51,6 @@ public CustomConfiguration([NotNull] string connectionString, /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual bool UseFluentApiOnly { get; set; } + public virtual bool UseDataAnnotations { get; set; } } } diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs index 1d05f8436aa..81de32b43b8 100644 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs +++ b/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs @@ -116,11 +116,11 @@ public virtual PropertyConfiguration GetOrAddPropertyConfiguration( /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual List GetFluentApiConfigurations(bool useFluentApiOnly) + public virtual List GetFluentApiConfigurations(bool useDataAnnotations) { - return (useFluentApiOnly - ? FluentApiConfigurations - : FluentApiConfigurations.Where(flc => !flc.HasAttributeEquivalent)) + return (useDataAnnotations + ? FluentApiConfigurations.Where(flc => !flc.HasAttributeEquivalent) + : FluentApiConfigurations) .ToList(); } @@ -128,19 +128,19 @@ public virtual List GetFluentApiConfigurations(bool use /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual List GetPropertyConfigurations(bool useFluentApiOnly) + public virtual List GetPropertyConfigurations(bool useDataAnnotations) { return PropertyConfigurations - .Where(pc => pc.GetFluentApiConfigurations(useFluentApiOnly).Any()).ToList(); + .Where(pc => pc.GetFluentApiConfigurations(useDataAnnotations).Any()).ToList(); } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual List GetRelationshipConfigurations(bool useFluentApiOnly) + public virtual List GetRelationshipConfigurations(bool useDataAnnotations) => RelationshipConfigurations - .Where(rc => useFluentApiOnly || !rc.HasAttributeEquivalent) + .Where(rc => !useDataAnnotations || !rc.HasAttributeEquivalent) .ToList(); } } diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs index 9c501e4d015..fa86ef1ae76 100644 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs +++ b/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs @@ -57,11 +57,11 @@ public PropertyConfiguration( /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual List GetFluentApiConfigurations(bool useFluentApiOnly) + public virtual List GetFluentApiConfigurations(bool useDataAnnotations) { - return useFluentApiOnly - ? FluentApiConfigurations - : FluentApiConfigurations.Where(fc => !fc.HasAttributeEquivalent).ToList(); + return useDataAnnotations + ? FluentApiConfigurations.Where(fc => !fc.HasAttributeEquivalent).ToList() + : FluentApiConfigurations; } } } diff --git a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs b/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs index e881a697cd7..ec45a686127 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs @@ -58,8 +58,8 @@ public virtual ModelConfiguration CreateModelConfiguration( /// public virtual CustomConfiguration CreateCustomConfiguration( [NotNull] string connectionString, [CanBeNull] string contextClassName, - [NotNull] string @namespace, bool useFluentApiOnly) - => new CustomConfiguration(connectionString, contextClassName, @namespace, useFluentApiOnly); + [NotNull] string @namespace, bool useDataAnnotations) + => new CustomConfiguration(connectionString, contextClassName, @namespace, useDataAnnotations); /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used diff --git a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs index c1d6fc7890a..840e41dd829 100644 --- a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs @@ -145,9 +145,9 @@ public virtual void AddOnModelCreating() var first = true; foreach (var entityConfig in _model.EntityConfigurations) { - var fluentApiConfigurations = entityConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseFluentApiOnly); - var propertyConfigurations = entityConfig.GetPropertyConfigurations(_model.CustomConfiguration.UseFluentApiOnly); - var relationshipConfigurations = entityConfig.GetRelationshipConfigurations(_model.CustomConfiguration.UseFluentApiOnly); + var fluentApiConfigurations = entityConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseDataAnnotations); + var propertyConfigurations = entityConfig.GetPropertyConfigurations(_model.CustomConfiguration.UseDataAnnotations); + var relationshipConfigurations = entityConfig.GetRelationshipConfigurations(_model.CustomConfiguration.UseDataAnnotations); if (fluentApiConfigurations.Count == 0 && propertyConfigurations.Count == 0 && relationshipConfigurations.Count == 0) @@ -246,7 +246,7 @@ public virtual void AddPropertyConfigurations( foreach (var propertyConfig in propertyConfigurations) { var fluentApiConfigurations = - propertyConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseFluentApiOnly); + propertyConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseDataAnnotations); if (fluentApiConfigurations.Count == 0) { continue; diff --git a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs index 527c7049aa2..18328159700 100644 --- a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs @@ -47,7 +47,7 @@ public virtual string WriteCode( _sb.AppendLine("using System;"); _sb.AppendLine("using System.Collections.Generic;"); - if (!_entity.ModelConfiguration.CustomConfiguration.UseFluentApiOnly) + if (_entity.ModelConfiguration.CustomConfiguration.UseDataAnnotations) { _sb.AppendLine("using System.ComponentModel.DataAnnotations;"); _sb.AppendLine("using System.ComponentModel.DataAnnotations.Schema;"); @@ -173,7 +173,7 @@ public virtual void AddAttributes( { Check.NotNull(attributeConfigurations, nameof(attributeConfigurations)); - if (!_entity.ModelConfiguration.CustomConfiguration.UseFluentApiOnly) + if (_entity.ModelConfiguration.CustomConfiguration.UseDataAnnotations) { foreach (var attrConfig in attributeConfigurations) { diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs index 96e09f7fb40..baaf1a4d322 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs @@ -59,7 +59,7 @@ public class ReverseEngineeringConfiguration /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual bool UseFluentApiOnly { get; set; } + public virtual bool UseDataAnnotations { get; set; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs index ed7fb5bbcff..88f8cd9d3c4 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs @@ -70,7 +70,7 @@ public virtual Task GenerateAsync( var customConfiguration = _configurationFactory .CreateCustomConfiguration( configuration.ConnectionString, configuration.ContextClassName, - outputPathsAndNamespace.Namespace, configuration.UseFluentApiOnly); + outputPathsAndNamespace.Namespace, configuration.UseDataAnnotations); var modelConfiguration = _configurationFactory .CreateModelConfiguration(metadataModel, customConfiguration); diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index c15235ff4e9..23b7b29a442 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -91,7 +91,8 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, // tests that ending DirectorySeparatorChar does not affect namespace ProjectRootNamespace = TestNamespace, OutputPath = TestSubDir, - TableSelectionSet = Filter + TableSelectionSet = Filter, + UseDataAnnotations = true }; var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); @@ -142,7 +143,7 @@ public void E2ETest_AllFluentApi() ProjectPath = TestProjectDir, ProjectRootNamespace = TestNamespace, OutputPath = null, // not used for this test - UseFluentApiOnly = true, + UseDataAnnotations = false, TableSelectionSet = Filter }; @@ -278,7 +279,7 @@ PRIMARY KEY (PrimaryKeyWithSequenceId) ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, ProjectRootNamespace = TestNamespace, ContextClassName = "PrimaryKeyWithSequenceContext", - UseFluentApiOnly = true + UseDataAnnotations = false }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), @@ -326,7 +327,7 @@ ON FilteredIndex (Number) WHERE Number > 10 ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, ProjectRootNamespace = TestNamespace, ContextClassName = "FilteredIndexContext", - UseFluentApiOnly = true + UseDataAnnotations = false }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), @@ -375,7 +376,7 @@ PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime) ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, ProjectRootNamespace = TestNamespace, ContextClassName = "SystemVersionedContext", - UseFluentApiOnly = true + UseDataAnnotations = false }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAllFluentApiE2ETest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAllFluentApiE2ETest.cs index 290424bb61a..db9ea816f4f 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAllFluentApiE2ETest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAllFluentApiE2ETest.cs @@ -14,7 +14,7 @@ public SqliteAllFluentApiE2ETest(ITestOutputHelper output) } protected override string DbSuffix { get; } = "FluentApi"; - protected override bool UseFluentApiOnly { get; } = true; + protected override bool UseDataAnnotations { get; } = false; protected override string ExpectedResultsParentDir { get; } = Path.Combine("ReverseEngineering", "Expected", "AllFluentApi"); protected override string ProviderName => "Microsoft.EntityFrameworkCore.Sqlite.Design"; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAttributesInsteadOfFluentApiE2ETest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAttributesInsteadOfFluentApiE2ETest.cs index 42aa79fb763..3933197aaaf 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAttributesInsteadOfFluentApiE2ETest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteAttributesInsteadOfFluentApiE2ETest.cs @@ -14,7 +14,7 @@ public SqliteAttributesInsteadOfFluentApiE2ETest(ITestOutputHelper output) } protected override string DbSuffix { get; } = "Attributes"; - protected override bool UseFluentApiOnly { get; } = false; + protected override bool UseDataAnnotations { get; } = true; protected override string ExpectedResultsParentDir { get; } = Path.Combine("ReverseEngineering", "Expected", "Attributes"); protected override string ProviderName => "Microsoft.EntityFrameworkCore.Sqlite.Design"; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs index f5d106d4a5a..f03fb12b0bd 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs @@ -47,7 +47,7 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal (Id) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -100,7 +100,7 @@ REFERENCES OneToManyPrincipal ( OneToManyPrincipalID1, OneToManyPrincipalID2 ) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -147,7 +147,7 @@ FOREIGN KEY (GroupId) REFERENCES Groups (Id) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -188,7 +188,7 @@ FOREIGN KEY (SelfForeignKey) REFERENCES SelfRef (Id) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -223,7 +223,7 @@ public async Task Missing_primary_key() ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); var errorMessage = RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Alicia"); @@ -257,7 +257,7 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal(Id) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -324,7 +324,7 @@ FOREIGN KEY (string) REFERENCES String (string) ConnectionString = testStore.ConnectionString, ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -361,7 +361,7 @@ FOREIGN KEY (UserAltId) REFERENCES User (AltId) ContextClassName = "FkToAltKeyContext", ProjectPath = TestProjectPath, ProjectRootNamespace = "E2E.Sqlite", - UseFluentApiOnly = UseFluentApiOnly, + UseDataAnnotations = UseDataAnnotations, TableSelectionSet = TableSelectionSet.All }); @@ -394,7 +394,7 @@ FOREIGN KEY (UserAltId) REFERENCES User (AltId) protected abstract string DbSuffix { get; } // will be used to create different databases so tests running in parallel don't interfere protected abstract string ExpectedResultsParentDir { get; } - protected abstract bool UseFluentApiOnly { get; } + protected abstract bool UseDataAnnotations { get; } protected override void ConfigureDesignTimeServices(IServiceCollection services) => new SqliteDesignTimeServices().ConfigureDesignTimeServices(services); From e02f03fe3ac4ce4fb097e2dd8a62bd315416e4a9 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Fri, 19 May 2017 20:56:42 -0700 Subject: [PATCH 03/11] Remove ReverseEngineerConfiguration Remove CustomConfiguration --- .../Design/Internal/DatabaseOperations.cs | 23 ++- .../Properties/DesignStrings.Designer.cs | 18 -- .../Properties/DesignStrings.resx | 9 - .../Internal/CustomConfiguration.cs | 56 ------ .../Internal/ModelConfiguration.cs | 25 ++- .../Internal/ConfigurationFactory.cs | 16 +- .../Scaffolding/Internal/DbContextWriter.cs | 14 +- .../Scaffolding/Internal/EntityTypeWriter.cs | 6 +- .../ReverseEngineeringConfiguration.cs | 100 ----------- .../Internal/ReverseEngineeringGenerator.cs | 170 ++++++------------ .../ReverseEngineeringConfigurationTests.cs | 78 ++++---- .../ReverseEngineeringGeneratorTests.cs | 63 ------- .../ReverseEngineering/SqlServerE2ETests.cs | 129 +++++++------ .../ReverseEngineering/SqliteE2ETestBase.cs | 142 ++++++++------- 14 files changed, 272 insertions(+), 577 deletions(-) delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs delete mode 100644 test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringGeneratorTests.cs diff --git a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs index 85941781f4c..9257858ee61 100644 --- a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs +++ b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs @@ -63,20 +63,17 @@ public virtual Task ScaffoldContextAsync( #pragma warning restore CS0618 // Type or member is obsolete var generator = services.GetRequiredService(); - var tableSelectionSet = new TableSelectionSet(tables, schemas); - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = connectionString, - ContextClassName = dbContextClassName, - ProjectPath = _projectDir, - ProjectRootNamespace = _rootNamespace, - OutputPath = outputDir, - TableSelectionSet = tableSelectionSet, - UseDataAnnotations = useDataAnnotations, - OverwriteFiles = overwriteFiles - }; - return generator.GenerateAsync(configuration, cancellationToken); + return generator.GenerateAsync( + connectionString, + new TableSelectionSet(tables, schemas), + _projectDir, + outputDir, + _rootNamespace, + dbContextClassName, + useDataAnnotations, + overwriteFiles, + cancellationToken); } } } diff --git a/src/EFCore.Design/Properties/DesignStrings.Designer.cs b/src/EFCore.Design/Properties/DesignStrings.Designer.cs index f0b5f5842ea..64f6bb4d172 100644 --- a/src/EFCore.Design/Properties/DesignStrings.Designer.cs +++ b/src/EFCore.Design/Properties/DesignStrings.Designer.cs @@ -280,12 +280,6 @@ public static string ForeignMigrations([CanBeNull] object migrationsNamespace) GetString("ForeignMigrations", nameof(migrationsNamespace)), migrationsNamespace); - /// - /// ConnectionString is required to generate code. - /// - public static string ConnectionStringRequired - => GetString("ConnectionStringRequired"); - /// /// The context class name passed in, {contextClassName}, is not a valid C# identifier. /// @@ -294,18 +288,6 @@ public static string ContextClassNotValidCSharpIdentifier([CanBeNull] object con GetString("ContextClassNotValidCSharpIdentifier", nameof(contextClassName)), contextClassName); - /// - /// ProjectPath is required to generate code. - /// - public static string ProjectPathRequired - => GetString("ProjectPathRequired"); - - /// - /// Root namespace of the project is required to generate code. - /// - public static string RootNamespaceRequired - => GetString("RootNamespaceRequired"); - /// /// Your target project '{assembly}' doesn't match your migrations assembly '{migrationsAssembly}'. Either change your target project or change your migrations assembly. /// Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("{assembly}")). By default, the migrations assembly is the assembly containing the DbContext. diff --git a/src/EFCore.Design/Properties/DesignStrings.resx b/src/EFCore.Design/Properties/DesignStrings.resx index 941c3aa8a84..14cca28a49b 100644 --- a/src/EFCore.Design/Properties/DesignStrings.resx +++ b/src/EFCore.Design/Properties/DesignStrings.resx @@ -222,18 +222,9 @@ The namespace '{migrationsNamespace}' contains migrations for a different DbContext. This can result in conflicting migration names. It's recommend to put migrations for different DbContext classes into different namespaces. - - ConnectionString is required to generate code. - The context class name passed in, {contextClassName}, is not a valid C# identifier. - - ProjectPath is required to generate code. - - - Root namespace of the project is required to generate code. - Your target project '{assembly}' doesn't match your migrations assembly '{migrationsAssembly}'. Either change your target project or change your migrations assembly. Change your migrations assembly by using DbContextOptionsBuilder. E.g. options.UseSqlServer(connection, b => b.MigrationsAssembly("{assembly}")). By default, the migrations assembly is the assembly containing the DbContext. diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs deleted file mode 100644 index 00e3e58abee..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/CustomConfiguration.cs +++ /dev/null @@ -1,56 +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 JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class CustomConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public CustomConfiguration([NotNull] string connectionString, - [CanBeNull] string contextClassName, [NotNull] string @namespace, - bool useDataAnnotations) - { - Check.NotEmpty(connectionString, nameof(connectionString)); - Check.NotEmpty(@namespace, nameof(@namespace)); - - ConnectionString = connectionString; - ContextClassName = contextClassName; - Namespace = @namespace; - UseDataAnnotations = useDataAnnotations; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ConnectionString { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ContextClassName { get; [param: CanBeNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string Namespace { get; [param: CanBeNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool UseDataAnnotations { get; set; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs index 69ce65f38f1..ba64757c10a 100644 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs +++ b/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs @@ -45,6 +45,8 @@ public class ModelConfiguration private SortedDictionary _entityConfigurationMap; private List _sequenceConfigurations; + private readonly string _connectionString; + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. @@ -52,21 +54,26 @@ public class ModelConfiguration public ModelConfiguration( [NotNull] ConfigurationFactory configurationFactory, [NotNull] IModel model, - [NotNull] CustomConfiguration customConfiguration, + [NotNull] string connectionString, + [NotNull] string contextName, + [NotNull] string @namespace, + bool useDataAnnotations, [NotNull] CSharpUtilities cSharpUtilities, [NotNull] ScaffoldingUtilities scaffoldingUtilities) { Check.NotNull(configurationFactory, nameof(configurationFactory)); Check.NotNull(model, nameof(model)); - Check.NotNull(customConfiguration, nameof(customConfiguration)); Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); Check.NotNull(scaffoldingUtilities, nameof(scaffoldingUtilities)); _configurationFactory = configurationFactory; + _connectionString = connectionString; + Namespace = @namespace; + ContextName = contextName; Model = model; - CustomConfiguration = customConfiguration; CSharpUtilities = cSharpUtilities; ScaffoldingUtilities = scaffoldingUtilities; + UseDataAnnotations = useDataAnnotations; _valueGeneratorConvention = new RelationalValueGeneratorConvention(); } @@ -92,7 +99,7 @@ public ModelConfiguration( /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual CustomConfiguration CustomConfiguration { get; [param: NotNull] set; } + public virtual bool UseDataAnnotations { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -113,7 +120,13 @@ public virtual string ClassName() /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual string Namespace() => CustomConfiguration.Namespace; + public virtual string Namespace { get; } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public virtual string ContextName { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -279,7 +292,7 @@ public virtual void AddConnectionStringConfiguration() { methodName + "(" - + CSharpUtilities.GenerateVerbatimStringLiteral(CustomConfiguration.ConnectionString) + + CSharpUtilities.GenerateVerbatimStringLiteral(_connectionString) + ")" })); } diff --git a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs b/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs index ec45a686127..4f1df46ff04 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs @@ -49,17 +49,11 @@ public ConfigurationFactory( /// public virtual ModelConfiguration CreateModelConfiguration( [NotNull] IModel model, - [NotNull] CustomConfiguration customConfiguration) - => new ModelConfiguration(this, model, customConfiguration, CSharpUtilities, ScaffoldingUtilities); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual CustomConfiguration CreateCustomConfiguration( - [NotNull] string connectionString, [CanBeNull] string contextClassName, - [NotNull] string @namespace, bool useDataAnnotations) - => new CustomConfiguration(connectionString, contextClassName, @namespace, useDataAnnotations); + [NotNull] string connectionString, + [NotNull] string contextName, + [NotNull] string @namespace, + bool useDataAnnotations) + => new ModelConfiguration(this, model, connectionString, contextName, @namespace, useDataAnnotations, CSharpUtilities, ScaffoldingUtilities); /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used diff --git a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs index 840e41dd829..956c11a1327 100644 --- a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs @@ -54,7 +54,7 @@ public virtual string WriteCode( _sb.AppendLine("using Microsoft.EntityFrameworkCore;"); _sb.AppendLine("using Microsoft.EntityFrameworkCore.Metadata;"); _sb.AppendLine(); - _sb.AppendLine("namespace " + _model.Namespace()); + _sb.AppendLine("namespace " + _model.Namespace); _sb.AppendLine("{"); using (_sb.Indent()) { @@ -72,9 +72,9 @@ public virtual string WriteCode( public virtual void AddClass() { var className = - string.IsNullOrWhiteSpace(_model.CustomConfiguration.ContextClassName) + string.IsNullOrWhiteSpace(_model.ContextName) ? _model.ClassName() - : _model.CustomConfiguration.ContextClassName; + : _model.ContextName; _sb.AppendLine("public partial class " + className + " : DbContext"); _sb.AppendLine("{"); using (_sb.Indent()) @@ -145,9 +145,9 @@ public virtual void AddOnModelCreating() var first = true; foreach (var entityConfig in _model.EntityConfigurations) { - var fluentApiConfigurations = entityConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseDataAnnotations); - var propertyConfigurations = entityConfig.GetPropertyConfigurations(_model.CustomConfiguration.UseDataAnnotations); - var relationshipConfigurations = entityConfig.GetRelationshipConfigurations(_model.CustomConfiguration.UseDataAnnotations); + var fluentApiConfigurations = entityConfig.GetFluentApiConfigurations(_model.UseDataAnnotations); + var propertyConfigurations = entityConfig.GetPropertyConfigurations(_model.UseDataAnnotations); + var relationshipConfigurations = entityConfig.GetRelationshipConfigurations(_model.UseDataAnnotations); if (fluentApiConfigurations.Count == 0 && propertyConfigurations.Count == 0 && relationshipConfigurations.Count == 0) @@ -246,7 +246,7 @@ public virtual void AddPropertyConfigurations( foreach (var propertyConfig in propertyConfigurations) { var fluentApiConfigurations = - propertyConfig.GetFluentApiConfigurations(_model.CustomConfiguration.UseDataAnnotations); + propertyConfig.GetFluentApiConfigurations(_model.UseDataAnnotations); if (fluentApiConfigurations.Count == 0) { continue; diff --git a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs index 18328159700..3d6e8b6ae7a 100644 --- a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs @@ -47,7 +47,7 @@ public virtual string WriteCode( _sb.AppendLine("using System;"); _sb.AppendLine("using System.Collections.Generic;"); - if (_entity.ModelConfiguration.CustomConfiguration.UseDataAnnotations) + if (_entity.ModelConfiguration.UseDataAnnotations) { _sb.AppendLine("using System.ComponentModel.DataAnnotations;"); _sb.AppendLine("using System.ComponentModel.DataAnnotations.Schema;"); @@ -65,7 +65,7 @@ public virtual string WriteCode( } _sb.AppendLine(); - _sb.AppendLine("namespace " + _entity.ModelConfiguration.Namespace()); + _sb.AppendLine("namespace " + _entity.ModelConfiguration.Namespace); _sb.AppendLine("{"); using (_sb.Indent()) { @@ -173,7 +173,7 @@ public virtual void AddAttributes( { Check.NotNull(attributeConfigurations, nameof(attributeConfigurations)); - if (_entity.ModelConfiguration.CustomConfiguration.UseDataAnnotations) + if (_entity.ModelConfiguration.UseDataAnnotations) { foreach (var attrConfig in attributeConfigurations) { diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs deleted file mode 100644 index baaf1a4d322..00000000000 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringConfiguration.cs +++ /dev/null @@ -1,100 +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 System; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Internal; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class ReverseEngineeringConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ConnectionString { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ContextClassName { get; [param: CanBeNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string CustomTemplatePath { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ProjectPath { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ProjectRootNamespace { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string OutputPath { get; [param: CanBeNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual TableSelectionSet TableSelectionSet { get; [param: CanBeNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool UseDataAnnotations { get; set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool OverwriteFiles { get; set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void CheckValidity() - { - if (string.IsNullOrEmpty(ConnectionString)) - { - throw new ArgumentException(DesignStrings.ConnectionStringRequired); - } - - if (string.IsNullOrEmpty(ProjectPath)) - { - throw new ArgumentException(DesignStrings.ProjectPathRequired); - } - - if (!string.IsNullOrWhiteSpace(ContextClassName) - && (!CSharpUtilities.Instance.IsValidIdentifier(ContextClassName) - || CSharpUtilities.Instance.IsCSharpKeyword(ContextClassName))) - { - throw new ArgumentException( - DesignStrings.ContextClassNotValidCSharpIdentifier(ContextClassName)); - } - - if (string.IsNullOrEmpty(ProjectRootNamespace)) - { - throw new ArgumentException(DesignStrings.RootNamespaceRequired); - } - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs index 88f8cd9d3c4..fae46378fc4 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs @@ -22,6 +22,7 @@ public class ReverseEngineeringGenerator { private readonly ConfigurationFactory _configurationFactory; private readonly IScaffoldingModelFactory _factory; + private static readonly char[] _directorySeparatorChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -52,59 +53,69 @@ public ReverseEngineeringGenerator( /// directly from your code. This API may change or be removed in future releases. /// public virtual Task GenerateAsync( - [NotNull] ReverseEngineeringConfiguration configuration, + [NotNull] string connectionString, + [NotNull] TableSelectionSet tableSelectionSet, + [NotNull] string projectPath, + [CanBeNull] string outputPath, + [NotNull] string rootNamespace, + [CanBeNull] string contextName, + bool useDataAnnotations, + bool overwriteFiles, CancellationToken cancellationToken = default(CancellationToken)) { - Check.NotNull(configuration, nameof(configuration)); + Check.NotEmpty(connectionString, nameof(connectionString)); + Check.NotNull(tableSelectionSet, nameof(tableSelectionSet)); + Check.NotEmpty(projectPath, nameof(projectPath)); + Check.NotEmpty(rootNamespace, nameof(rootNamespace)); cancellationToken.ThrowIfCancellationRequested(); - configuration.CheckValidity(); + if (!string.IsNullOrWhiteSpace(contextName) + && (!CSharpUtilities.Instance.IsValidIdentifier(contextName) + || CSharpUtilities.Instance.IsCSharpKeyword(contextName))) + { + throw new ArgumentException( + DesignStrings.ContextClassNotValidCSharpIdentifier(contextName)); + } - var metadataModel = GetMetadataModel(configuration); + var model = _factory.Create(connectionString, tableSelectionSet); - var outputPathsAndNamespace = ConstructNamespaceAndCanonicalizedPaths( - configuration.ProjectRootNamespace, - configuration.ProjectPath, configuration.OutputPath); + if (model == null) + { + throw new InvalidOperationException( + RelationalDesignStrings.ProviderReturnedNullModel( + _factory.GetType().ShortDisplayName())); + } - var customConfiguration = _configurationFactory - .CreateCustomConfiguration( - configuration.ConnectionString, configuration.ContextClassName, - outputPathsAndNamespace.Namespace, configuration.UseDataAnnotations); - var modelConfiguration = _configurationFactory - .CreateModelConfiguration(metadataModel, customConfiguration); + projectPath = projectPath.TrimEnd(_directorySeparatorChars); - var dbContextClassName = - string.IsNullOrWhiteSpace(customConfiguration.ContextClassName) - ? modelConfiguration.ClassName() - : customConfiguration.ContextClassName; + var fullProjectPath = Path.GetFullPath(projectPath); + var fullOutputPath = string.IsNullOrEmpty(outputPath) + ? fullProjectPath + : Path.GetFullPath(Path.Combine(projectPath, outputPath)); - CheckOutputFiles(outputPathsAndNamespace.CanonicalizedFullOutputPath, - dbContextClassName, metadataModel, configuration.OverwriteFiles); + var @namespace = rootNamespace; + if (!string.Equals(fullOutputPath, fullProjectPath) + && fullOutputPath.StartsWith(fullProjectPath, StringComparison.Ordinal)) + { + var relativeOutputPath = fullOutputPath.Substring(fullProjectPath.Length + 1); + @namespace += "." + string.Join( + ".", relativeOutputPath + .Split(_directorySeparatorChars, StringSplitOptions.RemoveEmptyEntries) + .Select(p => CSharpUtilities.Instance.GenerateCSharpIdentifier(p, null))); + } - return CodeWriter.WriteCodeAsync( - modelConfiguration, outputPathsAndNamespace.CanonicalizedFullOutputPath, - dbContextClassName, cancellationToken); - } + //var customConfiguration = _configurationFactory.CreateCustomConfiguration(connectionString, contextName, @namespace, useDataAnnotations); + var modelConfiguration = _configurationFactory.CreateModelConfiguration(model, connectionString, contextName, @namespace, useDataAnnotations); - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IModel GetMetadataModel([NotNull] ReverseEngineeringConfiguration configuration) - { - Check.NotNull(configuration, nameof(configuration)); + var dbContextClassName = + string.IsNullOrWhiteSpace(contextName) + ? modelConfiguration.ClassName() + : contextName; - var metadataModel = _factory.Create( - configuration.ConnectionString, configuration.TableSelectionSet); - if (metadataModel == null) - { - throw new InvalidOperationException( - RelationalDesignStrings.ProviderReturnedNullModel( - _factory.GetType().ShortDisplayName())); - } + CheckOutputFiles(fullOutputPath, dbContextClassName, model, overwriteFiles); - return metadataModel; + return CodeWriter.WriteCodeAsync(modelConfiguration, fullOutputPath, dbContextClassName, cancellationToken); } /// @@ -123,6 +134,7 @@ public virtual void CheckOutputFiles( var readOnlyFiles = CodeWriter.GetReadOnlyFilePaths( outputPath, dbContextClassName, metadataModel.GetEntityTypes()); + if (readOnlyFiles.Count > 0) { throw new InvalidOperationException( @@ -146,85 +158,5 @@ public virtual void CheckOutputFiles( } } } - - private static readonly char[] _directorySeparatorChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; - - /// - /// Construct canonicalized paths from the project path and output path and a namespace - /// based om the root namespace for the project. - /// - /// the root namespace for the project, must not be empty - /// path to the project, must not be empty, can be absolute or relative - /// path to output directory, can be null or empty, can be absolute or relative (to the project path) - /// - /// an object containing the canonicalized paths - /// and the namespace - /// - internal static NamespaceAndOutputPaths ConstructNamespaceAndCanonicalizedPaths( - [NotNull] string rootNamespace, - [NotNull] string projectPath, - [CanBeNull] string outputPath) - { - Check.NotEmpty(rootNamespace, nameof(rootNamespace)); - Check.NotEmpty(projectPath, nameof(projectPath)); - - // Strip off any directory separator chars at end of project path - // to ensure that when we strip off the canonicalized project path - // later to form the canonicalized relative path we strip off the - // correct number of characters. - for (var projectPathLastChar = projectPath.Last(); - _directorySeparatorChars.Contains(projectPathLastChar); - projectPathLastChar = projectPath.Last()) - { - projectPath = projectPath.Substring(0, projectPath.Length - 1); - } - - var canonicalizedFullProjectPath = Path.GetFullPath(projectPath); - var canonicalizedFullOutputPath = - string.IsNullOrEmpty(outputPath) - ? canonicalizedFullProjectPath - : Path.GetFullPath(Path.Combine(projectPath, outputPath)); - - var canonicalizedRelativeOutputPath = - canonicalizedFullOutputPath == canonicalizedFullProjectPath - ? string.Empty - : canonicalizedFullOutputPath.StartsWith(canonicalizedFullProjectPath, StringComparison.Ordinal) - ? canonicalizedFullOutputPath - .Substring(canonicalizedFullProjectPath.Length + 1) - : null; - - var @namespace = rootNamespace; - if (!string.IsNullOrEmpty(canonicalizedRelativeOutputPath)) - { - foreach (var pathPart in canonicalizedRelativeOutputPath - .Split(_directorySeparatorChars, StringSplitOptions.RemoveEmptyEntries)) - { - @namespace += "." + CSharpUtilities.Instance.GenerateCSharpIdentifier(pathPart, null); - } - } - - return new NamespaceAndOutputPaths(@namespace, - canonicalizedFullOutputPath, canonicalizedRelativeOutputPath); - } - - internal class NamespaceAndOutputPaths - { - internal NamespaceAndOutputPaths( - [NotNull] string @namespace, - [NotNull] string canonicalizedFullOutputPath, - [CanBeNull] string canonicalizedRelativeOutputPath) - { - Check.NotEmpty(@namespace, nameof(@namespace)); - Check.NotEmpty(canonicalizedFullOutputPath, nameof(canonicalizedFullOutputPath)); - - Namespace = @namespace; - CanonicalizedFullOutputPath = canonicalizedFullOutputPath; - CanonicalizedRelativeOutputPath = canonicalizedRelativeOutputPath; - } - - internal string Namespace { get; } - internal string CanonicalizedFullOutputPath { get; } - internal string CanonicalizedRelativeOutputPath { get; } - } } } diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index 3b3be6a490f..b44a8bfb4a4 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -3,6 +3,8 @@ using System; using Microsoft.EntityFrameworkCore.Internal; +using Microsoft.EntityFrameworkCore.ReverseEngineering; +using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -10,54 +12,38 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal public class ReverseEngineeringConfigurationTests { [Fact] - public void Throws_exceptions_for_incorrect_configuration() + public void Throws_exceptions_for_invalid_context_name() { - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = null, - ProjectPath = null, - OutputPath = null - }; - - Assert.Equal(DesignStrings.ConnectionStringRequired, - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ConnectionString = "NonEmptyConnectionString"; - Assert.Equal(DesignStrings.ProjectPathRequired, - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ProjectPath = "NonEmptyProjectPath"; - Assert.Equal(DesignStrings.RootNamespaceRequired, - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ContextClassName = @"Invalid!CSharp*Class&Name"; - Assert.Equal(DesignStrings.ContextClassNotValidCSharpIdentifier(@"Invalid!CSharp*Class&Name"), - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ContextClassName = "1CSharpClassNameCannotStartWithNumber"; - Assert.Equal(DesignStrings.ContextClassNotValidCSharpIdentifier("1CSharpClassNameCannotStartWithNumber"), - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ContextClassName = "volatile"; // cannot be C# keyword - Assert.Equal(DesignStrings.ContextClassNotValidCSharpIdentifier("volatile"), - Assert.Throws( - () => configuration.CheckValidity()).Message); - - configuration.ContextClassName = "GoodClassName"; - configuration.OutputPath = @"\AnAbsolutePath"; - Assert.Equal(DesignStrings.RootNamespaceRequired, - Assert.Throws( - () => configuration.CheckValidity()).Message); + ValidateContextNameInReverseEngineerGenerator("Invalid!CSharp*Class&Name"); + ValidateContextNameInReverseEngineerGenerator("1CSharpClassNameCannotStartWithNumber"); + ValidateContextNameInReverseEngineerGenerator("volatile"); + } - configuration.OutputPath = @"A\Relative\Path"; - Assert.Equal(DesignStrings.RootNamespaceRequired, - Assert.Throws( - () => configuration.CheckValidity()).Message); + private void ValidateContextNameInReverseEngineerGenerator(string contextName) + { + var scaffoldingUtility = new ScaffoldingUtilities(); + var reverseEngineer = new ReverseEngineeringGenerator( + new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), + new ConfigurationFactory(CSharpUtilities.Instance, scaffoldingUtility), + new StringBuilderCodeWriter( + new InMemoryFileService(), + new DbContextWriter(scaffoldingUtility, CSharpUtilities.Instance), + new EntityTypeWriter(CSharpUtilities.Instance))); + + Assert.Equal( + DesignStrings.ContextClassNotValidCSharpIdentifier(contextName), + Assert.Throws( + () => reverseEngineer.GenerateAsync( + connectionString: "connectionstring", + tableSelectionSet: TableSelectionSet.All, + projectPath: "FakeProjectPath", + outputPath: null, + rootNamespace: "FakeNamespace", + contextName: contextName, + useDataAnnotations: false, + overwriteFiles: false) + .Result) + .Message); } } } diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringGeneratorTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringGeneratorTests.cs deleted file mode 100644 index a9201f1f1b7..00000000000 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringGeneratorTests.cs +++ /dev/null @@ -1,63 +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 System.IO; -using Xunit; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - public class ReverseEngineeringGeneratorTests - { - [Theory] - [MemberData(nameof(NamespaceAndPathOptions))] - public void Constructs_correct_canonical_paths( - string rootNamespace, string projectPath, string outputPath, string expectedNamepace, - string canonicalizedFullOutputPath, string canonicalizedRelativeOutputPath) - { - var outputNamespaceAndPaths = ReverseEngineeringGenerator.ConstructNamespaceAndCanonicalizedPaths( - rootNamespace, projectPath, outputPath); - Assert.Equal(expectedNamepace, outputNamespaceAndPaths.Namespace); - Assert.Equal(canonicalizedFullOutputPath, outputNamespaceAndPaths.CanonicalizedFullOutputPath); - Assert.Equal(canonicalizedRelativeOutputPath, outputNamespaceAndPaths.CanonicalizedRelativeOutputPath); - } - - public static TheoryData NamespaceAndPathOptions - { - get - { - var data = new TheoryData(); - - if (Path.DirectorySeparatorChar == '\\' - || Path.AltDirectorySeparatorChar == '\\') - { - data.Add("Root.Namespace", @"X:\project\Path", null, "Root.Namespace", @"X:\project\Path", string.Empty); - data.Add("Root.Namespace", @"X:\project\Path", string.Empty, "Root.Namespace", @"X:\project\Path", string.Empty); - data.Add("Root.Namespace", @"X:\project\Path", @"X:\Absolute\Output\Path", "Root.Namespace", @"X:\Absolute\Output\Path", null); - data.Add("Root.Namespace", @"X:\project\Path", @"..\..\Path\Outside\Project", "Root.Namespace", @"X:\Path\Outside\Project", null); - data.Add("Root.Namespace", @"X:\project\Path", @"Path\Inside\Project", "Root.Namespace.Path.Inside.Project", @"X:\project\Path\Path\Inside\Project", @"Path\Inside\Project"); - data.Add("Root.Namespace", @"X:\project\Path", @"Path\.\Inside\Project", "Root.Namespace.Path.Inside.Project", @"X:\project\Path\Path\Inside\Project", @"Path\Inside\Project"); - data.Add("Root.Namespace", @"X:\project\Path", @"FirstDir\IgnoreThisDir\..\AnotherDir", "Root.Namespace.FirstDir.AnotherDir", @"X:\project\Path\FirstDir\AnotherDir", @"FirstDir\AnotherDir"); - data.Add("Root.Namespace", @"X:\project\Path", @"Keyword\volatile\123\Bad!$&Chars", "Root.Namespace.Keyword._volatile._123.Bad___Chars", @"X:\project\Path\Keyword\volatile\123\Bad!$&Chars", @"Keyword\volatile\123\Bad!$&Chars"); - } - else - { - data.Add("Root.Namespace", "/project/Path", null, "Root.Namespace", "/project/Path", string.Empty); - data.Add("Root.Namespace", "/project/Path", string.Empty, "Root.Namespace", "/project/Path", string.Empty); - data.Add("Root.Namespace", "/project/Path", "/Absolute/Output/Path", "Root.Namespace", "/Absolute/Output/Path", null); - data.Add("Root.Namespace", "/project/Path", "../../Path/Outside/Project", "Root.Namespace", "/Path/Outside/Project", null); - data.Add("Root.Namespace", "/project/Path", "Path/Inside/Project", "Root.Namespace.Path.Inside.Project", "/project/Path/Path/Inside/Project", "Path/Inside/Project"); - data.Add("Root.Namespace", "/project/Path", "Path/./Inside/Project", "Root.Namespace.Path.Inside.Project", "/project/Path/Path/Inside/Project", "Path/Inside/Project"); - data.Add("Root.Namespace", "/project/Path", "FirstDir/IgnoreThisDir/../AnotherDir", "Root.Namespace.FirstDir.AnotherDir", "/project/Path/FirstDir/AnotherDir", "FirstDir/AnotherDir"); - data.Add("Root.Namespace", "/project/Path", "Keyword/volatile/123/Bad!$&Chars", "Root.Namespace.Keyword._volatile._123.Bad___Chars", "/project/Path/Keyword/volatile/123/Bad!$&Chars", "Keyword/volatile/123/Bad!$&Chars"); - } - - return data; - } - } - } - - public class TheoryData : TheoryData - { - public void Add(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) => AddRow(t1, t2, t3, t4, t5, t6); - } -} diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index 23b7b29a442..6abd779d515 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -84,18 +84,17 @@ public SqlServerE2ETests(SqlServerE2EFixture fixture, ITestOutputHelper output) [UseCulture("en-US")] public void E2ETest_UseAttributesInsteadOfFluentApi() { - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = _connectionString, - ContextClassName = "AttributesContext", - ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, // tests that ending DirectorySeparatorChar does not affect namespace - ProjectRootNamespace = TestNamespace, - OutputPath = TestSubDir, - TableSelectionSet = Filter, - UseDataAnnotations = true - }; - - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + _connectionString, + Filter, + TestProjectDir + Path.DirectorySeparatorChar, // tests that ending DirectorySeparatorChar does not affect namespace + TestSubDir, + TestNamespace, + contextName: "AttributesContext", + useDataAnnotations: true, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); var actualFileSet = new FileSet(InMemoryFiles, Path.GetFullPath(Path.Combine(TestProjectDir, TestSubDir))) { @@ -137,17 +136,17 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() [UseCulture("en-US")] public void E2ETest_AllFluentApi() { - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = _connectionString, - ProjectPath = TestProjectDir, - ProjectRootNamespace = TestNamespace, - OutputPath = null, // not used for this test - UseDataAnnotations = false, - TableSelectionSet = Filter - }; - - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + _connectionString, + Filter, + TestProjectDir, + outputPath: null, // not used for this test + rootNamespace: TestNamespace, + contextName: null, + useDataAnnotations: false, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); var actualFileSet = new FileSet(InMemoryFiles, Path.GetFullPath(TestProjectDir)) { @@ -220,21 +219,26 @@ CREATE SEQUENCE DecimalSequence CREATE SEQUENCE NumericSequence AS numeric;"); - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = scratch.ConnectionString, - ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, - ProjectRootNamespace = TestNamespace, - ContextClassName = "SequenceContext" - }; - var expectedFileSet = new FileSet(new FileSystemFileService(), + + var expectedFileSet = new FileSet( + new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), contents => contents.Replace("{{connectionString}}", scratch.ConnectionString)) { Files = new List { "SequenceContext.expected" } }; - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + scratch.ConnectionString, + TableSelectionSet.All, + TestProjectDir + Path.DirectorySeparatorChar, + outputPath: null, // not used for this test + rootNamespace: TestNamespace, + contextName: "SequenceContext", + useDataAnnotations: false, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); var actualFileSet = new FileSet(InMemoryFiles, Path.GetFullPath(TestProjectDir)) { @@ -273,14 +277,6 @@ PRIMARY KEY (PrimaryKeyWithSequenceId) ); "); - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = scratch.ConnectionString, - ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, - ProjectRootNamespace = TestNamespace, - ContextClassName = "PrimaryKeyWithSequenceContext", - UseDataAnnotations = false - }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), contents => contents.Replace("{{connectionString}}", scratch.ConnectionString)) @@ -292,7 +288,17 @@ PRIMARY KEY (PrimaryKeyWithSequenceId) } }; - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + scratch.ConnectionString, + TableSelectionSet.All, + TestProjectDir + Path.DirectorySeparatorChar, + outputPath: null, // not used for this test + rootNamespace: TestNamespace, + contextName: "PrimaryKeyWithSequenceContext", + useDataAnnotations: false, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); var actualFileSet = new FileSet(InMemoryFiles, Path.GetFullPath(TestProjectDir)) { @@ -321,14 +327,6 @@ CREATE INDEX Unicorn_Filtered_Index ON FilteredIndex (Number) WHERE Number > 10 "); - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = scratch.ConnectionString, - ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, - ProjectRootNamespace = TestNamespace, - ContextClassName = "FilteredIndexContext", - UseDataAnnotations = false - }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), contents => contents.Replace("{{connectionString}}", scratch.ConnectionString)) @@ -340,7 +338,17 @@ ON FilteredIndex (Number) WHERE Number > 10 } }; - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + scratch.ConnectionString, + TableSelectionSet.All, + TestProjectDir + Path.DirectorySeparatorChar, + outputPath: null, // not used for this test + rootNamespace: TestNamespace, + contextName: "FilteredIndexContext", + useDataAnnotations: false, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); var actualFileSet = new FileSet(InMemoryFiles, Path.GetFullPath(TestProjectDir)) { @@ -370,14 +378,6 @@ PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime) WITH (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.History)); "); - var configuration = new ReverseEngineeringConfiguration - { - ConnectionString = scratch.ConnectionString, - ProjectPath = TestProjectDir + Path.DirectorySeparatorChar, - ProjectRootNamespace = TestNamespace, - ContextClassName = "SystemVersionedContext", - UseDataAnnotations = false - }; var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected"), contents => contents.Replace("{{connectionString}}", scratch.ConnectionString)) @@ -389,7 +389,18 @@ PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime) } }; - var filePaths = Generator.GenerateAsync(configuration).GetAwaiter().GetResult(); + var filePaths = Generator.GenerateAsync( + scratch.ConnectionString, + TableSelectionSet.All, + TestProjectDir + Path.DirectorySeparatorChar, + outputPath: null, // not used for this test + rootNamespace: TestNamespace, + contextName: "SystemVersionedContext", + useDataAnnotations: false, + overwriteFiles: false) + .GetAwaiter() + .GetResult(); + scratch.ExecuteNonQuery(@" ALTER TABLE dbo.SystemVersioned SET (SYSTEM_VERSIONING = OFF); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs index f03fb12b0bd..4c589c42671 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs @@ -42,14 +42,15 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal (Id) ); "); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); AssertLog(new LoggerMessages()); @@ -95,14 +96,15 @@ REFERENCES OneToManyPrincipal ( OneToManyPrincipalID1, OneToManyPrincipalID2 ) ); "); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); AssertLog(new LoggerMessages()); @@ -142,15 +144,16 @@ FOREIGN KEY (GroupId) REFERENCES Groups (Id) ); "); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); - + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); + AssertLog(new LoggerMessages()); var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine(ExpectedResultsParentDir, "ManyToMany")) @@ -183,15 +186,16 @@ public async Task Self_referencing() FOREIGN KEY (SelfForeignKey) REFERENCES SelfRef (Id) );"); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); - + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); + AssertLog(new LoggerMessages()); var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine(ExpectedResultsParentDir, "SelfRef")) @@ -218,14 +222,16 @@ public async Task Missing_primary_key() { testStore.ExecuteNonQuery("CREATE TABLE Alicia ( Keys TEXT );"); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); + var errorMessage = RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Alicia"); var expectedLog = new LoggerMessages { @@ -252,14 +258,15 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal(Id) ); CREATE TABLE IF NOT EXISTS Principal ( Id INT);"); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); var expectedLog = new LoggerMessages { @@ -319,14 +326,15 @@ FOREIGN KEY (string) REFERENCES String (string) ); "); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: null, + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); AssertLog(new LoggerMessages()); @@ -355,15 +363,15 @@ CREATE TABLE IF NOT EXISTS Comment ( FOREIGN KEY (UserAltId) REFERENCES User (AltId) );"); - var results = await Generator.GenerateAsync(new ReverseEngineeringConfiguration - { - ConnectionString = testStore.ConnectionString, - ContextClassName = "FkToAltKeyContext", - ProjectPath = TestProjectPath, - ProjectRootNamespace = "E2E.Sqlite", - UseDataAnnotations = UseDataAnnotations, - TableSelectionSet = TableSelectionSet.All - }); + var results = await Generator.GenerateAsync( + testStore.ConnectionString, + TableSelectionSet.All, + TestProjectPath, + outputPath: null, + rootNamespace: "E2E.Sqlite", + contextName: "FkToAltKeyContext", + useDataAnnotations: UseDataAnnotations, + overwriteFiles: false); AssertLog(new LoggerMessages()); From 05249433991ce11ab8df15a66354f82bb300e341 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Wed, 24 May 2017 14:57:54 -0700 Subject: [PATCH 04/11] Remove CustomConfiguration classes from Reverse Engineering Rewrite code writers to work directly from Model --- .../Internal/AttributeConfiguration.cs | 46 - .../Internal/EntityConfiguration.cs | 146 - .../Internal/FluentApiConfiguration.cs | 63 - .../Internal/IAttributeConfiguration.cs | 18 - .../Internal/IFluentApiConfiguration.cs | 26 - .../Internal/IndexConfiguration.cs | 85 - .../Internal/KeyFluentApiConfiguration.cs | 81 - .../Internal/ModelConfiguration.cs | 858 ---- .../NavigationPropertyConfiguration.cs | 53 - ...igationPropertyInitializerConfiguration.cs | 41 - .../Internal/OptionsBuilderConfiguration.cs | 39 - .../Internal/PropertyConfiguration.cs | 67 - .../Internal/RelationshipConfiguration.cs | 75 - .../Internal/SequenceConfiguration.cs | 39 - .../Scaffolding/Internal/CodeWriter.cs | 8 +- .../Internal/ConfigurationFactory.cs | 215 - .../Scaffolding/Internal/DbContextWriter.cs | 577 ++- .../Scaffolding/Internal/EntityTypeWriter.cs | 306 +- .../Internal/ReverseEngineeringGenerator.cs | 34 +- .../ScaffoldingServiceCollectionExtensions.cs | 2 - .../Internal/ScaffoldingUtilities.cs | 195 - .../Internal/StringBuilderCodeWriter.cs | 25 +- .../RelationalScaffoldingModelFactory.cs | 9 +- .../Metadata/RelationalKeyAnnotations.cs | 4 +- .../breakingchanges.netcore.json | 4411 +++++++++++------ .../ReverseEngineeringConfigurationTests.cs | 4 +- .../AllFluentApi/SelfReferencing.expected | 5 + ...rverReverseEngineerTestE2EContext.expected | 24 +- .../Expected/Attributes/AllDataTypes.expected | 12 +- .../Attributes/AttributesContext.expected | 61 +- .../Attributes/MultipleFKsDependent.expected | 2 +- .../Attributes/MultipleFKsPrincipal.expected | 2 +- .../Attributes/OneToManyDependent.expected | 2 +- .../Attributes/OneToManyPrincipal.expected | 2 +- .../Attributes/OneToOneDependent.expected | 2 +- .../OneToOneFKToUniqueKeyDependent.expected | 2 +- .../OneToOneFKToUniqueKeyPrincipal.expected | 2 +- .../Attributes/OneToOnePrincipal.expected | 2 +- .../OneToOneSeparateFKDependent.expected | 2 +- .../OneToOneSeparateFKPrincipal.expected | 2 +- .../Attributes/SelfReferencing.expected | 9 +- .../Attributes/UnmappablePKColumn.expected | 2 +- .../Expected/FilteredIndexContext.expected | 2 +- .../AllFluentApi/SelfRef/SelfRef.expected | 5 + .../NoPrincipalPkAttributesContext.expected | 3 +- .../OneToOneAttributesContext.expected | 5 + .../Attributes/SelfRef/SelfRef.expected | 5 + .../SelfRef/SelfRefAttributesContext.expected | 3 +- 48 files changed, 3772 insertions(+), 3811 deletions(-) delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/AttributeConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/FluentApiConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/IAttributeConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/IFluentApiConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/IndexConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/KeyFluentApiConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyInitializerConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/OptionsBuilderConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/RelationshipConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Configuration/Internal/SequenceConfiguration.cs delete mode 100644 src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs delete mode 100644 src/EFCore.Design/Scaffolding/Internal/ScaffoldingUtilities.cs diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/AttributeConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/AttributeConfiguration.cs deleted file mode 100644 index 6f4e010ff53..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/AttributeConfiguration.cs +++ /dev/null @@ -1,46 +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 System; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class AttributeConfiguration : IAttributeConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public AttributeConfiguration( - [NotNull] string attributeName, [CanBeNull] params string[] attributeArguments) - { - Check.NotEmpty(attributeName, nameof(attributeName)); - - AttributeBody = - attributeArguments == null || attributeArguments.Length == 0 - ? StripAttribute(attributeName) - : StripAttribute(attributeName) + "(" + string.Join(", ", attributeArguments) + ")"; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string AttributeBody { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected static string StripAttribute([NotNull] string attributeName) - => attributeName.EndsWith("Attribute", StringComparison.Ordinal) - ? attributeName.Substring(0, attributeName.Length - 9) - : attributeName; - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs deleted file mode 100644 index 81de32b43b8..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/EntityConfiguration.cs +++ /dev/null @@ -1,146 +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 System.Collections.Generic; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class EntityConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public EntityConfiguration( - [NotNull] ModelConfiguration modelConfiguration, - [NotNull] IEntityType entityType) - { - Check.NotNull(modelConfiguration, nameof(modelConfiguration)); - Check.NotNull(entityType, nameof(entityType)); - - ModelConfiguration = modelConfiguration; - EntityType = entityType; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ModelConfiguration ModelConfiguration { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IEntityType EntityType { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List AttributeConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List FluentApiConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List PropertyConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List NavigationPropertyConfigurations { get; } = - new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List NavigationPropertyInitializerConfigurations { get; } = - new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List RelationshipConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual PropertyConfiguration FindPropertyConfiguration([NotNull] IProperty property) - { - Check.NotNull(property, nameof(property)); - - return PropertyConfigurations.FirstOrDefault(pc => pc.Property == property); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual PropertyConfiguration GetOrAddPropertyConfiguration( - [NotNull] EntityConfiguration entityConfiguration, [NotNull] Property property) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(property, nameof(property)); - - var propertyConfiguration = FindPropertyConfiguration(property); - if (propertyConfiguration == null) - { - propertyConfiguration = new PropertyConfiguration(entityConfiguration, property); - PropertyConfigurations.Add(propertyConfiguration); - } - - return propertyConfiguration; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List GetFluentApiConfigurations(bool useDataAnnotations) - { - return (useDataAnnotations - ? FluentApiConfigurations.Where(flc => !flc.HasAttributeEquivalent) - : FluentApiConfigurations) - .ToList(); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List GetPropertyConfigurations(bool useDataAnnotations) - { - return PropertyConfigurations - .Where(pc => pc.GetFluentApiConfigurations(useDataAnnotations).Any()).ToList(); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List GetRelationshipConfigurations(bool useDataAnnotations) - => RelationshipConfigurations - .Where(rc => !useDataAnnotations || !rc.HasAttributeEquivalent) - .ToList(); - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/FluentApiConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/FluentApiConfiguration.cs deleted file mode 100644 index 762cfac9c93..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/FluentApiConfiguration.cs +++ /dev/null @@ -1,63 +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 System.Collections.Generic; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class FluentApiConfiguration : IFluentApiConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public FluentApiConfiguration( - [NotNull] string methodName, [CanBeNull] params string[] methodArguments) - { - Check.NotEmpty(methodName, nameof(methodName)); - - MethodName = methodName; - MethodArguments = methodArguments; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string MethodName { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string[] MethodArguments { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool HasAttributeEquivalent { get; set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string MethodBody - => MethodArguments == null - ? MethodName + "()" - : MethodName + "(" + string.Join(", ", MethodArguments) + ")"; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ICollection FluentApiLines - => new List { MethodBody }; - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/IAttributeConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/IAttributeConfiguration.cs deleted file mode 100644 index 133d4ac3572..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/IAttributeConfiguration.cs +++ /dev/null @@ -1,18 +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. - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public interface IAttributeConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - string AttributeBody { get; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/IFluentApiConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/IFluentApiConfiguration.cs deleted file mode 100644 index c058041423b..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/IFluentApiConfiguration.cs +++ /dev/null @@ -1,26 +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 System.Collections.Generic; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public interface IFluentApiConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - bool HasAttributeEquivalent { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - ICollection FluentApiLines { get; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/IndexConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/IndexConfiguration.cs deleted file mode 100644 index 9596df2ca88..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/IndexConfiguration.cs +++ /dev/null @@ -1,85 +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 System.Collections.Generic; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class IndexConfiguration : IFluentApiConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public IndexConfiguration( - [NotNull] string lambdaIdentifier, - [NotNull] Index index) - { - Check.NotEmpty(lambdaIdentifier, nameof(lambdaIdentifier)); - Check.NotNull(index, nameof(index)); - - LambdaIdentifier = lambdaIdentifier; - Index = index; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string LambdaIdentifier { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual Index Index { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool HasAttributeEquivalent => false; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ICollection FluentApiLines - { - get - { - var lines = new List - { - nameof(EntityTypeBuilder.HasIndex) + "(" + LambdaIdentifier + " => " - + new ScaffoldingUtilities().GenerateLambdaToKey(Index.Properties, LambdaIdentifier) + ")" - }; - - if (!string.IsNullOrEmpty(Index.Relational().Name)) - { - lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({CSharpUtilities.Instance.DelimitString(Index.Relational().Name)})"); - } - - if (Index.IsUnique) - { - lines.Add($".{nameof(IndexBuilder.IsUnique)}()"); - } - - if (Index.Relational().Filter != null) - { - lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasFilter)}(@\"{Index.Relational().Filter.Replace("\"", "\"\"")}\")"); - } - - return lines; - } - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/KeyFluentApiConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/KeyFluentApiConfiguration.cs deleted file mode 100644 index 15fd464b0ef..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/KeyFluentApiConfiguration.cs +++ /dev/null @@ -1,81 +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 System.Collections.Generic; -using System.Globalization; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class KeyFluentApiConfiguration : IFluentApiConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public KeyFluentApiConfiguration( - [NotNull] string lambdaIdentifier, - [NotNull] Key key) - { - Check.NotEmpty(lambdaIdentifier, nameof(lambdaIdentifier)); - Check.NotNull(key, nameof(key)); - - LambdaIdentifier = lambdaIdentifier; - Key = key; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string LambdaIdentifier { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual Key Key { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool HasAttributeEquivalent { get; set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ICollection FluentApiLines - { - get - { - var lines = new List - { - string.Format( - CultureInfo.InvariantCulture, - "{0}({1} => {2})", - nameof(EntityTypeBuilder.HasKey), - LambdaIdentifier, - new ScaffoldingUtilities().GenerateLambdaToKey(Key.Properties, LambdaIdentifier)) - }; - - if (Key.Relational().Name != null) - { - lines.Add("." + nameof(RelationalKeyBuilderExtensions.HasName) - + "(" + CSharpUtilities.Instance.DelimitString(Key.Relational().Name) + ")"); - } - - return lines; - } - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs deleted file mode 100644 index ba64757c10a..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/ModelConfiguration.cs +++ /dev/null @@ -1,858 +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 System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Diagnostics; -using System.Globalization; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class ModelConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected const string DbContextSuffix = "Context"; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected const string DefaultDbContextName = "Model" + DbContextSuffix; - - private static readonly KeyDiscoveryConvention _keyDiscoveryConvention = new KeyDiscoveryConvention(); - private readonly ValueGeneratorConvention _valueGeneratorConvention; - - private readonly ConfigurationFactory _configurationFactory; - private List _onConfiguringConfigurations; - private SortedDictionary _entityConfigurationMap; - private List _sequenceConfigurations; - - private readonly string _connectionString; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public ModelConfiguration( - [NotNull] ConfigurationFactory configurationFactory, - [NotNull] IModel model, - [NotNull] string connectionString, - [NotNull] string contextName, - [NotNull] string @namespace, - bool useDataAnnotations, - [NotNull] CSharpUtilities cSharpUtilities, - [NotNull] ScaffoldingUtilities scaffoldingUtilities) - { - Check.NotNull(configurationFactory, nameof(configurationFactory)); - Check.NotNull(model, nameof(model)); - Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); - Check.NotNull(scaffoldingUtilities, nameof(scaffoldingUtilities)); - - _configurationFactory = configurationFactory; - _connectionString = connectionString; - Namespace = @namespace; - ContextName = contextName; - Model = model; - CSharpUtilities = cSharpUtilities; - ScaffoldingUtilities = scaffoldingUtilities; - UseDataAnnotations = useDataAnnotations; - _valueGeneratorConvention = new RelationalValueGeneratorConvention(); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IModel Model { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual CSharpUtilities CSharpUtilities { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ScaffoldingUtilities ScaffoldingUtilities { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool UseDataAnnotations { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ClassName() - { - var annotatedName = Model.Scaffolding().DatabaseName; - if (!string.IsNullOrEmpty(annotatedName)) - { - return CSharpUtilities.GenerateCSharpIdentifier(annotatedName + DbContextSuffix, null); - } - - return DefaultDbContextName; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string Namespace { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ContextName { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List OnConfiguringConfigurations - { - get - { - if (_onConfiguringConfigurations == null) - { - _onConfiguringConfigurations = new List(); - AddConnectionStringConfiguration(); - } - - return _onConfiguringConfigurations; - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List EntityConfigurations - { - get - { - if (_entityConfigurationMap == null) - { - _entityConfigurationMap = new - SortedDictionary(EntityTypePathComparer.Instance); - AddEntityConfigurations(); - } - - return _entityConfigurationMap.Values.ToList(); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List SequenceConfigurations - { - get - { - if (_sequenceConfigurations == null) - { - AddSequenceConfigurations(); - } - return _sequenceConfigurations; - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddSequenceConfigurations() - { - _sequenceConfigurations = new List(); - foreach (var sequence in Model.Relational().Sequences) - { - var config = _configurationFactory.CreateSequenceConfiguration(); - - config.NameIdentifier = CSharpUtilities.DelimitString(sequence.Name); - - if (sequence.ClrType != Sequence.DefaultClrType) - { - config.TypeIdentifier = CSharpUtilities.GetTypeName(sequence.ClrType); - } - - if (!string.IsNullOrEmpty(sequence.Schema) - && Model.Relational().DefaultSchema != sequence.Schema) - { - config.SchemaNameIdentifier = CSharpUtilities.DelimitString(sequence.Schema); - } - - if (sequence.StartValue != Sequence.DefaultStartValue) - { - config.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - false, - nameof(RelationalSequenceBuilder.StartsAt), - sequence.StartValue.ToString(CultureInfo.InvariantCulture))); - } - if (sequence.IncrementBy != Sequence.DefaultIncrementBy) - { - config.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - false, - nameof(RelationalSequenceBuilder.IncrementsBy), - sequence.IncrementBy.ToString(CultureInfo.InvariantCulture))); - } - - if (sequence.MinValue != Sequence.DefaultMinValue) - { - config.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - false, - nameof(RelationalSequenceBuilder.HasMin), - sequence.MinValue?.ToString(CultureInfo.InvariantCulture) ?? "")); - } - - if (sequence.MaxValue != Sequence.DefaultMaxValue) - { - config.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - false, - nameof(RelationalSequenceBuilder.HasMax), - sequence.MaxValue?.ToString(CultureInfo.InvariantCulture) ?? "")); - } - - if (sequence.IsCyclic != Sequence.DefaultIsCyclic) - { - config.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - false, - nameof(RelationalSequenceBuilder.IsCyclic))); - } - - _sequenceConfigurations.Add(config); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddEntityConfigurations() - { - foreach (var entityType in Model.GetEntityTypes()) - { - var entityConfiguration = - _configurationFactory.CreateEntityConfiguration(this, entityType); - - AddEntityPropertiesConfiguration(entityConfiguration); - AddEntityConfiguration(entityConfiguration); - AddNavigationProperties(entityConfiguration); - AddNavigationPropertyInitializers(entityConfiguration); - AddRelationshipConfiguration(entityConfiguration); - - _entityConfigurationMap.Add((EntityType)entityType, entityConfiguration); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddConnectionStringConfiguration() - { - var methodName = Model.Scaffolding().UseProviderMethodName; - - if (string.IsNullOrEmpty(methodName)) - { - throw new InvalidOperationException(RelationalDesignStrings.MissingUseProviderMethodNameAnnotation); - } - - _onConfiguringConfigurations.Add( - _configurationFactory.CreateOptionsBuilderConfiguration( - new List - { - methodName - + "(" - + CSharpUtilities.GenerateVerbatimStringLiteral(_connectionString) - + ")" - })); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddEntityPropertiesConfiguration([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - foreach (var property in ScaffoldingUtilities.OrderedProperties(entityConfiguration.EntityType)) - { - var propertyConfiguration = - _configurationFactory.CreatePropertyConfiguration(entityConfiguration, property); - AddPropertyConfiguration(propertyConfiguration); - entityConfiguration.PropertyConfigurations.Add(propertyConfiguration); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddEntityConfiguration([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - AddKeyConfiguration(entityConfiguration); - AddTableNameConfiguration(entityConfiguration); - AddIndexConfigurations(entityConfiguration); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddKeyConfiguration([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - var entityType = (EntityType)entityConfiguration.EntityType; - foreach (var key in entityType.GetKeys()) - { - if (key == null - || key.Properties.Count == 0) - { - continue; - } - - var conventionKeyProperties = - _keyDiscoveryConvention.DiscoverKeyProperties(entityType, entityType.GetProperties().ToList()); - if (conventionKeyProperties != null - && key.Properties.OrderBy(p => p.Name).SequenceEqual(conventionKeyProperties.OrderBy(p => p.Name))) - { - continue; - } - - if (key.IsPrimaryKey()) - { - var keyFluentApi = _configurationFactory - .CreateKeyFluentApiConfiguration("e", key); - - if (key.Properties.Count == 1 - && key.Relational().Name == - RelationalKeyAnnotations - .GetDefaultKeyName( - entityType.Relational().TableName, - true, /* is primary key */ - key.Properties.Select(p => p.Relational().ColumnName))) - { - keyFluentApi.HasAttributeEquivalent = true; - - var propertyConfiguration = - entityConfiguration.GetOrAddPropertyConfiguration( - entityConfiguration, key.Properties.First()); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration(nameof(KeyAttribute))); - } - - entityConfiguration.FluentApiConfigurations.Add(keyFluentApi); - } - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddTableNameConfiguration([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - var entityType = entityConfiguration.EntityType; - var relationalEntityType = entityType.Relational(); - - if (relationalEntityType.Schema != null - && relationalEntityType.Schema != Model.Relational().DefaultSchema) - { - var delimitedTableName = - CSharpUtilities.DelimitString(relationalEntityType.TableName); - var delimitedSchemaName = - CSharpUtilities.DelimitString(relationalEntityType.Schema); - entityConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalEntityTypeBuilderExtensions.ToTable), - delimitedTableName, - delimitedSchemaName)); - entityConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(TableAttribute), - delimitedTableName, - nameof(TableAttribute.Schema) + " = " + delimitedSchemaName)); - } - else if (relationalEntityType.TableName != null - && relationalEntityType.TableName != entityType.Scaffolding().DbSetName) - { - var delimitedTableName = - CSharpUtilities.DelimitString(relationalEntityType.TableName); - entityConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalEntityTypeBuilderExtensions.ToTable), - delimitedTableName)); - entityConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(TableAttribute), delimitedTableName)); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddIndexConfigurations([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - foreach (var index in entityConfiguration.EntityType.GetIndexes().Cast()) - { - AddIndexConfiguration(entityConfiguration, index); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddIndexConfiguration( - [NotNull] EntityConfiguration entityConfiguration, - [NotNull] Index index) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(index, nameof(index)); - - entityConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateIndexConfiguration("e", index)); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddPropertyConfiguration([NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - AddRequiredConfiguration(propertyConfiguration); - AddColumnNameAndTypeConfiguration(propertyConfiguration); - AddMaxLengthConfiguration(propertyConfiguration); - AddDefaultValueConfiguration(propertyConfiguration); - AddDefaultExpressionConfiguration(propertyConfiguration); - AddComputedExpressionConfiguration(propertyConfiguration); - AddValueGeneratedConfiguration(propertyConfiguration); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddRequiredConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - if (!propertyConfiguration.Property.IsNullable - && propertyConfiguration.Property.ClrType.IsNullableType()) - { - var entityKeyProperties = - ((EntityType)propertyConfiguration.EntityConfiguration.EntityType) - .FindPrimaryKey()?.Properties - ?? Enumerable.Empty(); - if (!entityKeyProperties.Contains(propertyConfiguration.Property)) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(PropertyBuilder.IsRequired))); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration(nameof(RequiredAttribute))); - } - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddMaxLengthConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - var maxLength = propertyConfiguration.Property.GetMaxLength(); - if (maxLength.HasValue) - { - var maxLengthLiteral = - CSharpUtilities.GenerateLiteral(maxLength.Value); - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(PropertyBuilder.HasMaxLength), maxLengthLiteral)); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration(nameof(MaxLengthAttribute), maxLengthLiteral)); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddValueGeneratedConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - var valueGenerated = propertyConfiguration.Property.ValueGenerated; - if (!((Property)propertyConfiguration.Property).GetValueGeneratedConfigurationSource().HasValue - || _valueGeneratorConvention.GetValueGenerated((Property)propertyConfiguration.Property) == valueGenerated) - { - return; - } - - string methodName; - switch (valueGenerated) - { - case ValueGenerated.OnAdd: - methodName = nameof(PropertyBuilder.ValueGeneratedOnAdd); - break; - - case ValueGenerated.OnUpdate: - methodName = nameof(PropertyBuilder.ValueGeneratedOnUpdate); - break; - - case ValueGenerated.OnAddOrUpdate: - methodName = nameof(PropertyBuilder.ValueGeneratedOnAddOrUpdate); - break; - - case ValueGenerated.Never: - methodName = nameof(PropertyBuilder.ValueGeneratedNever); - break; - - default: - throw new ArgumentOutOfRangeException(); - } - - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ false, - methodName)); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddColumnNameAndTypeConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - var relationalProperty = propertyConfiguration.Property.Relational(); - - var delimitedColumnName = - relationalProperty.ColumnName != null - && relationalProperty.ColumnName != propertyConfiguration.Property.Name - ? CSharpUtilities.DelimitString( - relationalProperty.ColumnName) - : null; - - var delimitedColumnTypeName = - relationalProperty.ColumnType != null - ? CSharpUtilities.DelimitString( - relationalProperty.ColumnType) - : null; - - if (delimitedColumnName != null - && delimitedColumnTypeName != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalPropertyBuilderExtensions.HasColumnName), - delimitedColumnName)); - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalPropertyBuilderExtensions.HasColumnType), - delimitedColumnTypeName)); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(ColumnAttribute), - delimitedColumnName, - nameof(ColumnAttribute.TypeName) + " = " + delimitedColumnTypeName)); - } - else if (delimitedColumnName != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalPropertyBuilderExtensions.HasColumnName), - delimitedColumnName)); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration(nameof(ColumnAttribute), delimitedColumnName)); - } - else if (delimitedColumnTypeName != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ true, - nameof(RelationalPropertyBuilderExtensions.HasColumnType), - delimitedColumnTypeName)); - propertyConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(ColumnAttribute), nameof(ColumnAttribute.TypeName) + " = " + delimitedColumnTypeName)); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddDefaultValueConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - if (propertyConfiguration.Property.Relational().DefaultValue != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ false, - nameof(RelationalPropertyBuilderExtensions.HasDefaultValue), - CSharpUtilities.GenerateLiteral( - (dynamic)propertyConfiguration.Property.Relational().DefaultValue))); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddDefaultExpressionConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - if (propertyConfiguration.Property.Relational().DefaultValueSql != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ false, - nameof(RelationalPropertyBuilderExtensions.HasDefaultValueSql), - CSharpUtilities.DelimitString( - propertyConfiguration.Property.Relational().DefaultValueSql))); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddComputedExpressionConfiguration( - [NotNull] PropertyConfiguration propertyConfiguration) - { - Check.NotNull(propertyConfiguration, nameof(propertyConfiguration)); - - if (propertyConfiguration.Property.Relational().ComputedColumnSql != null) - { - propertyConfiguration.FluentApiConfigurations.Add( - _configurationFactory.CreateFluentApiConfiguration( - /* hasAttributeEquivalent */ false, - nameof(RelationalPropertyBuilderExtensions.HasComputedColumnSql), - CSharpUtilities.DelimitString( - propertyConfiguration.Property.Relational().ComputedColumnSql))); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddNavigationProperties([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - foreach (var otherEntityType in entityConfiguration.EntityType - .Model.GetEntityTypes().Where(et => et != entityConfiguration.EntityType)) - { - // set up the navigation properties for foreign keys from another EntityType - // which reference this EntityType (i.e. this EntityType is the principal) - foreach (var foreignKey in otherEntityType - .GetForeignKeys().Where(fk => fk.PrincipalEntityType == entityConfiguration.EntityType)) - { - var principalNavProp = foreignKey.PrincipalToDependent; - if (principalNavProp != null) - { - var referencedType = foreignKey.IsUnique - ? otherEntityType.Name - : "ICollection<" + otherEntityType.Name + ">"; - var navPropConfiguration = - _configurationFactory.CreateNavigationPropertyConfiguration( - referencedType, principalNavProp.Name); - - var dependentNavProp = foreignKey.DependentToPrincipal; - if (foreignKey.PrincipalKey.IsPrimaryKey() - && dependentNavProp != null) - { - navPropConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(InversePropertyAttribute), - CSharpUtilities.DelimitString(dependentNavProp.Name))); - } - - entityConfiguration.NavigationPropertyConfigurations.Add(navPropConfiguration); - } - } - } - - foreach (var foreignKey in entityConfiguration.EntityType.GetForeignKeys()) - { - // set up the navigation property on this end of foreign keys owned by this EntityType - // (i.e. this EntityType is the dependent) - var dependentNavProp = foreignKey.DependentToPrincipal; - if (dependentNavProp != null) - { - var dependentEndNavPropConfiguration = - _configurationFactory.CreateNavigationPropertyConfiguration( - foreignKey.PrincipalEntityType.Name, dependentNavProp.Name); - - var principalNavProp = foreignKey.PrincipalToDependent; - if (foreignKey.PrincipalKey.IsPrimaryKey() - && principalNavProp != null) - { - dependentEndNavPropConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(ForeignKeyAttribute), - CSharpUtilities.DelimitString( - string.Join(",", foreignKey.Properties.Select(p => p.Name))))); - dependentEndNavPropConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(InversePropertyAttribute), - CSharpUtilities.DelimitString(principalNavProp.Name))); - } - - entityConfiguration.NavigationPropertyConfigurations.Add( - dependentEndNavPropConfiguration); - - // set up the other navigation property for self-referencing foreign keys owned by this EntityType - if (((ForeignKey)foreignKey).IsSelfReferencing() - && principalNavProp != null) - { - var referencedType = foreignKey.IsUnique - ? foreignKey.DeclaringEntityType.Name - : "ICollection<" + foreignKey.DeclaringEntityType.Name + ">"; - var principalEndNavPropConfiguration = - _configurationFactory.CreateNavigationPropertyConfiguration( - referencedType, principalNavProp.Name); - principalEndNavPropConfiguration.AttributeConfigurations.Add( - _configurationFactory.CreateAttributeConfiguration( - nameof(InversePropertyAttribute), - CSharpUtilities.DelimitString(dependentNavProp.Name))); - entityConfiguration.NavigationPropertyConfigurations.Add( - principalEndNavPropConfiguration); - } - } - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddNavigationPropertyInitializers([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - foreach (var otherEntityType in entityConfiguration.EntityType.Model.GetEntityTypes().Where(et => et != entityConfiguration.EntityType)) - { - // find navigation properties for foreign keys from another EntityType which reference this EntityType - foreach (var foreignKey in otherEntityType - .GetForeignKeys().Where(fk => fk.PrincipalEntityType == entityConfiguration.EntityType)) - { - var navigationProperty = foreignKey.PrincipalToDependent; - if (!foreignKey.IsUnique - && navigationProperty != null) - { - entityConfiguration.NavigationPropertyInitializerConfigurations.Add( - _configurationFactory.CreateNavigationPropertyInitializerConfiguration( - navigationProperty.Name, otherEntityType.Name)); - } - } - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddRelationshipConfiguration([NotNull] EntityConfiguration entityConfiguration) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - - foreach (var foreignKey in entityConfiguration.EntityType.GetForeignKeys()) - { - var dependentEndNavigationProperty = foreignKey.DependentToPrincipal; - var principalEndNavigationProperty = foreignKey.PrincipalToDependent; - if (dependentEndNavigationProperty != null - && principalEndNavigationProperty != null) - { - var relationshipConfiguration = _configurationFactory - .CreateRelationshipConfiguration( - entityConfiguration, - foreignKey, - dependentEndNavigationProperty.Name, - principalEndNavigationProperty.Name, - foreignKey.DeleteBehavior); - relationshipConfiguration.HasAttributeEquivalent = foreignKey.PrincipalKey.IsPrimaryKey(); - entityConfiguration.RelationshipConfigurations.Add(relationshipConfiguration); - } - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual EntityConfiguration GetEntityConfiguration([NotNull] EntityType entityType) - { - if (_entityConfigurationMap == null) - { - // ReSharper disable once AssignmentIsFullyDiscarded - _ = EntityConfigurations; - - Debug.Assert(_entityConfigurationMap != null); - } - - return _entityConfigurationMap[entityType]; - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyConfiguration.cs deleted file mode 100644 index 62291e8fb53..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyConfiguration.cs +++ /dev/null @@ -1,53 +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 System.Collections.Generic; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class NavigationPropertyConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public NavigationPropertyConfiguration([NotNull] string type, [NotNull] string name) - { - Check.NotNull(type, nameof(type)); - Check.NotEmpty(name, nameof(name)); - - Type = type; - Name = name; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string ErrorAnnotation { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string Type { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string Name { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List AttributeConfigurations { get; } = new List(); - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyInitializerConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyInitializerConfiguration.cs deleted file mode 100644 index 1dffa0cea13..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/NavigationPropertyInitializerConfiguration.cs +++ /dev/null @@ -1,41 +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 JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class NavigationPropertyInitializerConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public NavigationPropertyInitializerConfiguration( - [NotNull] string navPropName, [NotNull] string principalEntityTypeName) - { - Check.NotEmpty(navPropName, nameof(navPropName)); - Check.NotEmpty(principalEntityTypeName, nameof(principalEntityTypeName)); - - NavigationPropertyName = navPropName; - PrincipalEntityTypeName = principalEntityTypeName; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string NavigationPropertyName { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string PrincipalEntityTypeName { get; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/OptionsBuilderConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/OptionsBuilderConfiguration.cs deleted file mode 100644 index 9b1be88831b..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/OptionsBuilderConfiguration.cs +++ /dev/null @@ -1,39 +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 System.Collections.Generic; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class OptionsBuilderConfiguration : IFluentApiConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public OptionsBuilderConfiguration([NotNull] ICollection methodBodyLines) - { - Check.NotNull(methodBodyLines, nameof(methodBodyLines)); - - FluentApiLines = methodBodyLines; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool HasAttributeEquivalent { get; } = false; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ICollection FluentApiLines { get; [param: NotNull] set; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs deleted file mode 100644 index fa86ef1ae76..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/PropertyConfiguration.cs +++ /dev/null @@ -1,67 +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 System.Collections.Generic; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class PropertyConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public PropertyConfiguration( - [NotNull] EntityConfiguration entityConfiguration, [NotNull] IProperty property) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(property, nameof(property)); - - EntityConfiguration = entityConfiguration; - Property = property; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual EntityConfiguration EntityConfiguration { get; [param: NotNull] private set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IProperty Property { get; [param: NotNull] private set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List AttributeConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List FluentApiConfigurations { get; } = new List(); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List GetFluentApiConfigurations(bool useDataAnnotations) - { - return useDataAnnotations - ? FluentApiConfigurations.Where(fc => !fc.HasAttributeEquivalent).ToList() - : FluentApiConfigurations; - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/RelationshipConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/RelationshipConfiguration.cs deleted file mode 100644 index 56459f7816d..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/RelationshipConfiguration.cs +++ /dev/null @@ -1,75 +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 JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class RelationshipConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public RelationshipConfiguration( - [NotNull] EntityConfiguration entityConfiguration, - [NotNull] IForeignKey foreignKey, - [NotNull] string dependentEndNavigationPropertyName, - [NotNull] string principalEndNavigationPropertyName, - DeleteBehavior onDeleteAction) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(foreignKey, nameof(foreignKey)); - Check.NotEmpty(dependentEndNavigationPropertyName, nameof(dependentEndNavigationPropertyName)); - Check.NotEmpty(principalEndNavigationPropertyName, nameof(principalEndNavigationPropertyName)); - - EntityConfiguration = entityConfiguration; - ForeignKey = foreignKey; - DependentEndNavigationPropertyName = dependentEndNavigationPropertyName; - PrincipalEndNavigationPropertyName = principalEndNavigationPropertyName; - OnDeleteAction = onDeleteAction; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual bool HasAttributeEquivalent { get; set; } = true; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual EntityConfiguration EntityConfiguration { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IForeignKey ForeignKey { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string DependentEndNavigationPropertyName { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string PrincipalEndNavigationPropertyName { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual DeleteBehavior OnDeleteAction { get; } - } -} diff --git a/src/EFCore.Design/Scaffolding/Configuration/Internal/SequenceConfiguration.cs b/src/EFCore.Design/Scaffolding/Configuration/Internal/SequenceConfiguration.cs deleted file mode 100644 index 90d8ef9fc26..00000000000 --- a/src/EFCore.Design/Scaffolding/Configuration/Internal/SequenceConfiguration.cs +++ /dev/null @@ -1,39 +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 System.Collections.Generic; -using JetBrains.Annotations; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class SequenceConfiguration - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string NameIdentifier { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string SchemaNameIdentifier { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string TypeIdentifier { get; [param: NotNull] set; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual List FluentApiConfigurations { get; } = new List(); - } -} diff --git a/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs index ce5f39f9557..a1b1b07b169 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs @@ -8,7 +8,6 @@ using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -114,9 +113,12 @@ public virtual IList GetReadOnlyFilePaths( /// directly from your code. This API may change or be removed in future releases. /// public abstract Task WriteCodeAsync( - [NotNull] ModelConfiguration modelConfiguration, + [NotNull] IModel model, [NotNull] string outputPath, - [NotNull] string dbContextClassName, + [NotNull] string @namespace, + [NotNull] string contextName, + [NotNull] string connectionString, + bool dataAnnotations, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs b/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs deleted file mode 100644 index 4f1df46ff04..00000000000 --- a/src/EFCore.Design/Scaffolding/Internal/ConfigurationFactory.cs +++ /dev/null @@ -1,215 +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 System.Collections.Generic; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class ConfigurationFactory - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public ConfigurationFactory( - [NotNull] CSharpUtilities cSharpUtilities, - [NotNull] ScaffoldingUtilities scaffoldingUtilities) - { - Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); - Check.NotNull(scaffoldingUtilities, nameof(scaffoldingUtilities)); - - CSharpUtilities = cSharpUtilities; - ScaffoldingUtilities = scaffoldingUtilities; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected virtual CSharpUtilities CSharpUtilities { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected virtual ScaffoldingUtilities ScaffoldingUtilities { get; } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual ModelConfiguration CreateModelConfiguration( - [NotNull] IModel model, - [NotNull] string connectionString, - [NotNull] string contextName, - [NotNull] string @namespace, - bool useDataAnnotations) - => new ModelConfiguration(this, model, connectionString, contextName, @namespace, useDataAnnotations, CSharpUtilities, ScaffoldingUtilities); - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual OptionsBuilderConfiguration CreateOptionsBuilderConfiguration( - [NotNull] ICollection methodBodyLines) - { - Check.NotNull(methodBodyLines, nameof(methodBodyLines)); - - return new OptionsBuilderConfiguration(methodBodyLines); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual EntityConfiguration CreateEntityConfiguration( - [NotNull] ModelConfiguration modelConfiguration, - [NotNull] IEntityType entityType) - { - Check.NotNull(modelConfiguration, nameof(modelConfiguration)); - Check.NotNull(entityType, nameof(entityType)); - - return new EntityConfiguration(modelConfiguration, entityType); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual RelationshipConfiguration CreateRelationshipConfiguration( - [NotNull] EntityConfiguration entityConfiguration, - [NotNull] IForeignKey foreignKey, - [NotNull] string dependentEndNavigationPropertyName, - [NotNull] string principalEndNavigationPropertyName, - DeleteBehavior onDeleteAction) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(foreignKey, nameof(foreignKey)); - Check.NotEmpty(dependentEndNavigationPropertyName, nameof(dependentEndNavigationPropertyName)); - Check.NotEmpty(principalEndNavigationPropertyName, nameof(principalEndNavigationPropertyName)); - - return new RelationshipConfiguration( - entityConfiguration, - foreignKey, - dependentEndNavigationPropertyName, - principalEndNavigationPropertyName, - onDeleteAction); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual PropertyConfiguration CreatePropertyConfiguration( - [NotNull] EntityConfiguration entityConfiguration, - [NotNull] IProperty property) - { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); - Check.NotNull(property, nameof(property)); - - return new PropertyConfiguration(entityConfiguration, property); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual NavigationPropertyConfiguration CreateNavigationPropertyConfiguration( - [NotNull] string type, [NotNull] string name) - { - Check.NotEmpty(type, nameof(type)); - Check.NotEmpty(name, nameof(name)); - - return new NavigationPropertyConfiguration(type, name); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual NavigationPropertyInitializerConfiguration CreateNavigationPropertyInitializerConfiguration( - [NotNull] string navPropName, [NotNull] string principalEntityTypeName) - { - Check.NotEmpty(navPropName, nameof(navPropName)); - Check.NotEmpty(principalEntityTypeName, nameof(principalEntityTypeName)); - - return new NavigationPropertyInitializerConfiguration(navPropName, principalEntityTypeName); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual FluentApiConfiguration CreateFluentApiConfiguration( - bool attributeEquivalentExists, - [NotNull] string methodName, - [CanBeNull] params string[] methodArguments) - { - Check.NotEmpty(methodName, nameof(methodName)); - Check.NotNull(methodArguments, nameof(methodArguments)); - - return new FluentApiConfiguration(methodName, methodArguments) - { - HasAttributeEquivalent = attributeEquivalentExists - }; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual KeyFluentApiConfiguration CreateKeyFluentApiConfiguration( - [NotNull] string lambdaIdentifier, - [NotNull] Key key) - { - Check.NotEmpty(lambdaIdentifier, nameof(lambdaIdentifier)); - Check.NotNull(key, nameof(key)); - - return new KeyFluentApiConfiguration(lambdaIdentifier, key); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual AttributeConfiguration CreateAttributeConfiguration( - [NotNull] string attributeName, - [CanBeNull] params string[] attributeArguments) - { - Check.NotEmpty(attributeName, nameof(attributeName)); - Check.NotNull(attributeArguments, nameof(attributeArguments)); - - return new AttributeConfiguration(attributeName, attributeArguments); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IndexConfiguration CreateIndexConfiguration( - [NotNull] string lambdaIdentifier, - [NotNull] Index index) - { - Check.NotEmpty(lambdaIdentifier, nameof(lambdaIdentifier)); - Check.NotNull(index, nameof(index)); - - return new IndexConfiguration(lambdaIdentifier, index); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual SequenceConfiguration CreateSequenceConfiguration() - => new SequenceConfiguration(); - } -} diff --git a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs index 956c11a1327..88d82af2f8a 100644 --- a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs @@ -1,12 +1,15 @@ // 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 System; using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; +using Microsoft.EntityFrameworkCore.Metadata.Builders; +using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -19,23 +22,20 @@ public class DbContextWriter { private const string EntityLambdaIdentifier = "entity"; - private ScaffoldingUtilities ScaffoldingUtilities { get; } + private CSharpUtilities CSharpUtilities { get; } private IndentedStringBuilder _sb; - private ModelConfiguration _model; - private bool _foundFirstFluentApiForEntity; + private bool _entityTypeBuilderInitialized; /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// public DbContextWriter( - [NotNull] ScaffoldingUtilities scaffoldingUtilities, [NotNull] CSharpUtilities cSharpUtilities) { - Check.NotNull(scaffoldingUtilities, nameof(scaffoldingUtilities)); Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); - ScaffoldingUtilities = scaffoldingUtilities; + CSharpUtilities = cSharpUtilities; } /// @@ -43,56 +43,77 @@ public DbContextWriter( /// directly from your code. This API may change or be removed in future releases. /// public virtual string WriteCode( - [NotNull] ModelConfiguration modelConfiguration) + [NotNull] IModel model, + [NotNull] string @namespace, + [NotNull] string contextName, + [NotNull] string connectionString, + bool useDataAnnotations) { - Check.NotNull(modelConfiguration, nameof(modelConfiguration)); + Check.NotNull(model, nameof(model)); - _model = modelConfiguration; _sb = new IndentedStringBuilder(); _sb.AppendLine("using System;"); // Guid default values require new Guid() which requires this using _sb.AppendLine("using Microsoft.EntityFrameworkCore;"); _sb.AppendLine("using Microsoft.EntityFrameworkCore.Metadata;"); _sb.AppendLine(); - _sb.AppendLine("namespace " + _model.Namespace); + + _sb.AppendLine($"namespace {@namespace}"); _sb.AppendLine("{"); + using (_sb.Indent()) { - AddClass(); + GenerateClass(model, contextName, connectionString, useDataAnnotations); } + _sb.Append("}"); return _sb.ToString(); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddClass() + private void GenerateClass(IModel model, string contextName, string connectionString, bool useDataAnnotations) { - var className = - string.IsNullOrWhiteSpace(_model.ContextName) - ? _model.ClassName() - : _model.ContextName; - _sb.AppendLine("public partial class " + className + " : DbContext"); + _sb.AppendLine($"public partial class {contextName} : DbContext"); _sb.AppendLine("{"); + using (_sb.Indent()) { - AddDbSetProperties(); - AddEntityTypeErrors(); - AddOnConfiguring(); - _sb.AppendLine(); - AddOnModelCreating(); + GenerateDbSets(model); + GenerateEntityTypeErrors(model); + GenerateOnConfiguring(model, connectionString); + GenerateOnModelCreating(model, useDataAnnotations); } + _sb.AppendLine("}"); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddOnConfiguring() + private void GenerateDbSets(IModel model) + { + foreach (var entityType in model.GetEntityTypes()) + { + _sb.AppendLine($"public virtual DbSet<{entityType.Name}> {entityType.Scaffolding().DbSetName} {{ get; set; }}"); + } + + if (model.GetEntityTypes().Any()) + { + _sb.AppendLine(); + } + } + + private void GenerateEntityTypeErrors(IModel model) + { + foreach (var entityTypeError in model.Scaffolding().EntityTypeErrors) + { + _sb.AppendLine($"// {entityTypeError.Value} Please see the warning messages."); + } + + if (model.Scaffolding().EntityTypeErrors.Any()) + { + _sb.AppendLine(); + } + } + + private void GenerateOnConfiguring(IModel model, string connectionString) { _sb.AppendLine("protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)"); _sb.AppendLine("{"); @@ -106,257 +127,433 @@ public virtual void AddOnConfiguring() { _sb.AppendLine("#warning " + DesignStrings.SensitiveInformationWarning); - foreach (var optionsBuilderConfig in _model.OnConfiguringConfigurations) + var methodName = model.Scaffolding().UseProviderMethodName; + + if (string.IsNullOrEmpty(methodName)) { - if (optionsBuilderConfig.FluentApiLines.Count == 0) - { - continue; - } - - _sb.Append("optionsBuilder." + optionsBuilderConfig.FluentApiLines.First()); - using (_sb.Indent()) - { - foreach (var line in optionsBuilderConfig.FluentApiLines.Skip(1)) - { - _sb.AppendLine(); - _sb.Append(line); - } - } - _sb.AppendLine(";"); + throw new InvalidOperationException(RelationalDesignStrings.MissingUseProviderMethodNameAnnotation); } + + _sb.AppendLine($"optionsBuilder.{methodName}({CSharpUtilities.GenerateVerbatimStringLiteral(connectionString)});"); } _sb.AppendLine("}"); } _sb.AppendLine("}"); + + _sb.AppendLine(); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddOnModelCreating() + + private void GenerateOnModelCreating(IModel model, bool useDataAnnotations) { _sb.AppendLine("protected override void OnModelCreating(ModelBuilder modelBuilder)"); - _sb.AppendLine("{"); + _sb.Append("{"); using (_sb.Indent()) { - var first = true; - foreach (var entityConfig in _model.EntityConfigurations) + foreach (var entityType in model.GetEntityTypes()) { - var fluentApiConfigurations = entityConfig.GetFluentApiConfigurations(_model.UseDataAnnotations); - var propertyConfigurations = entityConfig.GetPropertyConfigurations(_model.UseDataAnnotations); - var relationshipConfigurations = entityConfig.GetRelationshipConfigurations(_model.UseDataAnnotations); - if (fluentApiConfigurations.Count == 0 - && propertyConfigurations.Count == 0 - && relationshipConfigurations.Count == 0) - { - continue; - } + _entityTypeBuilderInitialized = false; - if (!first) - { - _sb.AppendLine(); - } - first = false; + GenerateEntityType(entityType, useDataAnnotations); - _sb.AppendLine("modelBuilder.Entity<" - + entityConfig.EntityType.Name + ">(" - + EntityLambdaIdentifier + " =>"); - _sb.AppendLine("{"); - using (_sb.Indent()) + if (_entityTypeBuilderInitialized) { - _foundFirstFluentApiForEntity = false; - AddEntityFluentApi(fluentApiConfigurations); - AddPropertyConfigurations(propertyConfigurations); - AddRelationshipConfigurations(relationshipConfigurations); + _sb.AppendLine("});"); } - _sb.AppendLine("});"); } - foreach (var sequenceConfig in _model.SequenceConfigurations) + foreach (var sequence in model.Relational().Sequences) { - if (!first) - { - _sb.AppendLine(); - } - first = false; - - _sb.Append("modelBuilder.HasSequence") - .Append(!string.IsNullOrEmpty(sequenceConfig.TypeIdentifier) ? "<" + sequenceConfig.TypeIdentifier + ">" : "") - .Append("(" + sequenceConfig.NameIdentifier) - .Append(!string.IsNullOrEmpty(sequenceConfig.SchemaNameIdentifier) ? ", " + sequenceConfig.SchemaNameIdentifier : "") - .Append(")"); - - AddFluentConfigurations(sequenceConfig.FluentApiConfigurations); + GenerateSequence(sequence); } } _sb.AppendLine("}"); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddEntityFluentApi( - [NotNull] List fluentApiConfigurations) + private void InitializeEntityTypeBuilder(IEntityType entityType) { - Check.NotNull(fluentApiConfigurations, nameof(fluentApiConfigurations)); + if (!_entityTypeBuilderInitialized) + { + _sb.AppendLine(); + _sb.AppendLine($"modelBuilder.Entity<{entityType.Name}>({EntityLambdaIdentifier} =>"); + _sb.Append("{"); + } + + _entityTypeBuilderInitialized = true; + } + + private void GenerateEntityType(IEntityType entityType, bool useDataAnnotations) + { + GenerateKey(entityType.FindPrimaryKey(), useDataAnnotations); - foreach (var entityFluentApi in fluentApiConfigurations) + if (!useDataAnnotations) { - if (entityFluentApi.FluentApiLines.Count == 0) - { - continue; - } + GenerateTableName(entityType); + } - if (_foundFirstFluentApiForEntity) - { - _sb.AppendLine(); - } - _foundFirstFluentApiForEntity = true; + foreach (var index in entityType.GetIndexes()) + { + GenerateIndex(index); + } + + foreach (var property in entityType.GetProperties()) + { + GenerateProperty(property, useDataAnnotations); + } + + foreach (var foreignKey in entityType.GetForeignKeys()) + { + GenerateRelationship(foreignKey, useDataAnnotations); + } + } + + private void AppendMultiLineFluentApi(IEntityType entityType, IList lines) + { + if (lines.Count <= 0) + { + return; + } + + InitializeEntityTypeBuilder(entityType); - _sb.Append(EntityLambdaIdentifier + "." + entityFluentApi.FluentApiLines.First()); - if (entityFluentApi.FluentApiLines.Count > 1) + using (_sb.Indent()) + { + _sb.AppendLine(); + + _sb.Append(EntityLambdaIdentifier + lines[0]); + + using (_sb.Indent()) { - using (_sb.Indent()) + foreach (var line in lines.Skip(1)) { - foreach (var line in entityFluentApi.FluentApiLines.Skip(1)) - { - _sb.AppendLine(); - _sb.Append(line); - } + _sb.AppendLine(); + _sb.Append(line); } } + _sb.AppendLine(";"); } } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddPropertyConfigurations( - [NotNull] List propertyConfigurations) + private void GenerateKey(IKey key, bool useDataAnnotations) { - Check.NotNull(propertyConfigurations, nameof(propertyConfigurations)); + if (key == null) + { + return; + } + + var explicitName = key.Relational().Name != new RelationalKeyAnnotations(key).GetDefaultName(); - foreach (var propertyConfig in propertyConfigurations) + if (key.Properties.Count == 1) { - var fluentApiConfigurations = - propertyConfig.GetFluentApiConfigurations(_model.UseDataAnnotations); - if (fluentApiConfigurations.Count == 0) + + if (key is Key concreteKey + && key.Properties.SequenceEqual(new KeyDiscoveryConvention().DiscoverKeyProperties(concreteKey.DeclaringEntityType, concreteKey.DeclaringEntityType.GetProperties().ToList()))) { - continue; + return; } - if (_foundFirstFluentApiForEntity) + if (!explicitName + && useDataAnnotations) { - _sb.AppendLine(); + return; } - _foundFirstFluentApiForEntity = true; - _sb.Append(EntityLambdaIdentifier - + ".Property(e => e." + propertyConfig.Property.Name + ")"); + } + + var lines = new List + { + $".{nameof(EntityTypeBuilder.HasKey)}(e => {GenerateLambdaToKey(key.Properties, "e")})" + }; - AddFluentConfigurations(fluentApiConfigurations); + if (explicitName) + { + lines.Add($".{nameof(RelationalKeyBuilderExtensions.HasName)}({CSharpUtilities.DelimitString(key.Relational().Name)})"); } + + AppendMultiLineFluentApi(key.DeclaringEntityType, lines); } - private void AddFluentConfigurations(List fluentApiConfigurations) + private void GenerateTableName(IEntityType entityType) { - if (fluentApiConfigurations.Count > 1) + var tableName = entityType.Relational().TableName; + var schema = entityType.Relational().Schema; + var defaultSchema = entityType.Model.Relational().DefaultSchema; + + var explicitSchema = schema != null && schema != defaultSchema; + var explicitTable = explicitSchema || tableName != null && tableName != entityType.Scaffolding().DbSetName; + + if (explicitTable) { - _sb.AppendLine(); - _sb.IncrementIndent(); + var parameterString = CSharpUtilities.DelimitString(tableName); + if (explicitSchema) + { + parameterString += ", " + CSharpUtilities.DelimitString(schema); + } + + var lines = new List + { + $".{nameof(RelationalEntityTypeBuilderExtensions.ToTable)}({parameterString})" + }; + + AppendMultiLineFluentApi(entityType, lines); + } + } + + private void GenerateIndex(IIndex index) + { + var lines = new List + { + $".{nameof(EntityTypeBuilder.HasIndex)}(e => {GenerateLambdaToKey(index.Properties, "e")})" + }; + + if (!string.IsNullOrEmpty(index.Relational().Name)) + { + lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({CSharpUtilities.Instance.DelimitString(index.Relational().Name)})"); + } + + if (index.IsUnique) + { + lines.Add($".{nameof(IndexBuilder.IsUnique)}()"); + } + + if (index.Relational().Filter != null) + { + lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasFilter)}({CSharpUtilities.DelimitString(index.Relational().Filter)})"); } - var first = true; - foreach (var fluentApiConfiguration in fluentApiConfigurations) + AppendMultiLineFluentApi(index.DeclaringEntityType, lines); + } + + private void GenerateProperty(IProperty property, bool useDataAnnotations) + { + var lines = new List + { + $".{nameof(EntityTypeBuilder.Property)}(e => e.{property.Name})" + }; + + if (!useDataAnnotations) { - if (!first) + if (!property.IsNullable + && property.ClrType.IsNullableType() + && !property.IsPrimaryKey()) { - _sb.AppendLine(); + lines.Add($".{nameof(PropertyBuilder.IsRequired)}()"); + } + + var columnName = property.Relational().ColumnName; + + if (columnName != null + && columnName != property.Name) + { + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnName)}({CSharpUtilities.DelimitString(columnName)})"); + } + + var columnType = property.Relational().ColumnType; + + if (columnType != null) + { + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnType)}({CSharpUtilities.DelimitString(columnType)})"); } - first = false; - foreach (var line in fluentApiConfiguration.FluentApiLines) + var maxLength = property.GetMaxLength(); + + if (maxLength.HasValue) { - _sb.Append("." + line); + lines.Add($".{nameof(PropertyBuilder.HasMaxLength)}({CSharpUtilities.GenerateLiteral(maxLength.Value)})"); } } - _sb.AppendLine(";"); - if (fluentApiConfigurations.Count > 1) + if (property.Relational().DefaultValue != null) { - _sb.DecrementIndent(); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValue)}({CSharpUtilities.GenerateLiteral((dynamic)property.Relational().DefaultValue)})"); } - } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddRelationshipConfigurations( - [NotNull] List relationshipConfigurations) - { - Check.NotNull(relationshipConfigurations, nameof(relationshipConfigurations)); + if (property.Relational().DefaultValueSql != null) + { + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValueSql)}({CSharpUtilities.DelimitString(property.Relational().DefaultValueSql)})"); + } + + if (property.Relational().ComputedColumnSql != null) + { + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasComputedColumnSql)}({CSharpUtilities.DelimitString(property.Relational().ComputedColumnSql)})"); + } - foreach (var relationshipConfig in relationshipConfigurations) + var valueGenerated = property.ValueGenerated; + if (((Property)property).GetValueGeneratedConfigurationSource().HasValue + && new RelationalValueGeneratorConvention().GetValueGenerated((Property)property) != valueGenerated) { - if (_foundFirstFluentApiForEntity) + string methodName; + switch (valueGenerated) { - _sb.AppendLine(); + case ValueGenerated.OnAdd: + methodName = nameof(PropertyBuilder.ValueGeneratedOnAdd); + break; + + case ValueGenerated.OnAddOrUpdate: + methodName = nameof(PropertyBuilder.ValueGeneratedOnAddOrUpdate); + break; + + case ValueGenerated.Never: + methodName = nameof(PropertyBuilder.ValueGeneratedNever); + break; + + default: + methodName = ""; + break; } - _foundFirstFluentApiForEntity = true; - ScaffoldingUtilities.LayoutRelationshipConfigurationLines( - _sb, EntityLambdaIdentifier, relationshipConfig, "d", "p"); + + lines.Add($".{methodName}()"); + } + + switch (lines.Count) + { + case 1: + return; + case 2: + lines = new List + { + lines[0] + lines[1] + }; + break; } + + AppendMultiLineFluentApi(property.DeclaringEntityType, lines); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddDbSetProperties() + private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotations) { - if (!_model.EntityConfigurations.Any()) + var canUseDataAnnotations = true; + var lines = new List { - return; + $".{nameof(EntityTypeBuilder.HasOne)}(d => d.{foreignKey.DependentToPrincipal.Name})", + $".{(foreignKey.IsUnique ? nameof(ReferenceNavigationBuilder.WithOne) : nameof(ReferenceNavigationBuilder.WithMany))}" + + $"(p => p.{foreignKey.PrincipalToDependent.Name})" + }; + + if (!foreignKey.PrincipalKey.IsPrimaryKey()) + { + canUseDataAnnotations = false; + lines.Add($".{nameof(ReferenceReferenceBuilder.HasPrincipalKey)}" + + $"{(foreignKey.IsUnique ? $"<{foreignKey.PrincipalEntityType.DisplayName()}>" : "")}" + + $"(p => {GenerateLambdaToKey(foreignKey.PrincipalKey.Properties, "p")})"); } - foreach (var entityConfig in _model.EntityConfigurations) + lines.Add($".{nameof(ReferenceReferenceBuilder.HasForeignKey)}" + + $"{(foreignKey.IsUnique ? $"<{foreignKey.DeclaringEntityType.DisplayName()}>" : "")}" + + $"(d => {GenerateLambdaToKey(foreignKey.Properties, "d")})"); + + var defaultOnDeleteAction = foreignKey.IsRequired + ? DeleteBehavior.Cascade + : DeleteBehavior.Restrict; + + if (foreignKey.DeleteBehavior != defaultOnDeleteAction) { - _sb.AppendLine("public virtual DbSet<" - + entityConfig.EntityType.Name - + "> " + entityConfig.EntityType.Scaffolding().DbSetName - + " { get; set; }"); + canUseDataAnnotations = false; + lines.Add($".{nameof(ReferenceReferenceBuilder.OnDelete)}({CSharpUtilities.GenerateLiteral(foreignKey.DeleteBehavior)})"); } - _sb.AppendLine(); + if (foreignKey.Relational().Name != + RelationalForeignKeyAnnotations.GetDefaultForeignKeyName( + foreignKey.DeclaringEntityType.Relational().TableName, + foreignKey.PrincipalEntityType.Relational().TableName, + foreignKey.Properties.Select(p => p.Relational().ColumnName))) + { + canUseDataAnnotations = false; + lines.Add($".{nameof(RelationalReferenceReferenceBuilderExtensions.HasConstraintName)}({CSharpUtilities.DelimitString(foreignKey.Relational().Name)})"); + } + + if (!useDataAnnotations || !canUseDataAnnotations) + { + AppendMultiLineFluentApi(foreignKey.DeclaringEntityType, lines); + } } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddEntityTypeErrors() + private void GenerateSequence(ISequence sequence) { - if (_model.Model.Scaffolding().EntityTypeErrors.Count == 0) + var methodName = nameof(RelationalModelBuilderExtensions.HasSequence); + + if (sequence.ClrType != Sequence.DefaultClrType) { - return; + methodName += $"<{CSharpUtilities.GetTypeName(sequence.ClrType)}>"; + } + + var parameters = CSharpUtilities.DelimitString(sequence.Name); + + if (string.IsNullOrEmpty(sequence.Schema) + && sequence.Model.Relational().DefaultSchema != sequence.Schema) + { + parameters += $", {CSharpUtilities.DelimitString(sequence.Schema)}"; } - foreach (var entityConfig in _model.Model.Scaffolding().EntityTypeErrors) + var lines = new List + { + $"modelBuilder.{methodName}({parameters})" + }; + + if (sequence.StartValue != Sequence.DefaultStartValue) { - _sb.Append("// ") - .Append(entityConfig.Value) - .AppendLine(" Please see the warning messages."); + lines.Add($".{nameof(RelationalSequenceBuilder.StartsAt)}({sequence.StartValue})"); + } + + if (sequence.IncrementBy != Sequence.DefaultIncrementBy) + { + lines.Add($".{nameof(RelationalSequenceBuilder.IncrementsBy)}({sequence.IncrementBy})"); + } + + if (sequence.MinValue != Sequence.DefaultMinValue) + { + lines.Add($".{nameof(RelationalSequenceBuilder.HasMin)}({sequence.MinValue})"); + } + + if (sequence.MaxValue != Sequence.DefaultMaxValue) + { + lines.Add($".{nameof(RelationalSequenceBuilder.HasMax)}({sequence.MaxValue})"); + } + + if (sequence.IsCyclic != Sequence.DefaultIsCyclic) + { + lines.Add($".{nameof(RelationalSequenceBuilder.IsCyclic)}()"); + } + + if (lines.Count == 2) + { + lines = new List + { + lines[0] + lines[1] + }; } _sb.AppendLine(); + _sb.Append(lines[0]); + + using (_sb.Indent()) + { + foreach (var line in lines.Skip(1)) + { + _sb.AppendLine(); + _sb.Append(line); + } + } + + _sb.AppendLine(";"); + } + + private string GenerateLambdaToKey( + IReadOnlyList properties, + string lambdaIdentifier) + { + if (properties.Count <= 0) + { + return ""; + } + + return properties.Count == 1 + ? $"{lambdaIdentifier}.{properties[0].Name}" + : $"new {{ {string.Join(", ", properties.Select(p => lambdaIdentifier + "." + p.Name))} }}"; } } } diff --git a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs index 3d6e8b6ae7a..1009f2714a0 100644 --- a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs @@ -1,12 +1,16 @@ // 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 System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; +using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -18,8 +22,9 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal public class EntityTypeWriter { private CSharpUtilities CSharpUtilities { get; } + private IndentedStringBuilder _sb; - private EntityConfiguration _entity; + private bool _useDataAnnotations; /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -37,149 +42,304 @@ public EntityTypeWriter( /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual string WriteCode( - [NotNull] EntityConfiguration entityConfiguration) + public virtual string WriteCode([NotNull] IEntityType entityType, [NotNull] string @namespace, bool useDataAnnotations) { - Check.NotNull(entityConfiguration, nameof(entityConfiguration)); + Check.NotNull(entityType, nameof(entityType)); + Check.NotNull(@namespace, nameof(@namespace)); - _entity = entityConfiguration; _sb = new IndentedStringBuilder(); + _useDataAnnotations = useDataAnnotations; _sb.AppendLine("using System;"); _sb.AppendLine("using System.Collections.Generic;"); - if (_entity.ModelConfiguration.UseDataAnnotations) + + if (_useDataAnnotations) { _sb.AppendLine("using System.ComponentModel.DataAnnotations;"); _sb.AppendLine("using System.ComponentModel.DataAnnotations.Schema;"); } - foreach (var ns in _entity.EntityType.GetProperties() + foreach (var ns in entityType.GetProperties() .Select(p => p.ClrType.Namespace) .Where(ns => ns != "System" && ns != "System.Collections.Generic") .Distinct()) { - _sb - .Append("using ") - .Append(ns) - .AppendLine(';'); + _sb.AppendLine($"using {ns};"); } _sb.AppendLine(); - _sb.AppendLine("namespace " + _entity.ModelConfiguration.Namespace); + _sb.AppendLine($"namespace {@namespace}"); _sb.AppendLine("{"); + using (_sb.Indent()) { - AddClass(); + GenerateClass(entityType); } + _sb.AppendLine("}"); return _sb.ToString(); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddClass() + private void GenerateClass(IEntityType entityType) { - AddAttributes(_entity.AttributeConfigurations); - _sb.AppendLine("public partial class " + _entity.EntityType.Name); + if (_useDataAnnotations) + { + GenerateEntityTypeDataAnnotations(entityType); + } + + _sb.AppendLine($"public partial class {entityType.Name}"); + _sb.AppendLine("{"); + using (_sb.Indent()) { - AddConstructor(); - AddProperties(); - AddNavigationProperties(); + GenerateConstructor(entityType); + GenerateProperties(entityType); + GenerateNavigationProperties(entityType); } + _sb.AppendLine("}"); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddConstructor() + private void GenerateEntityTypeDataAnnotations(IEntityType entityType) + { + GenerateTableAttribute(entityType); + } + + private void GenerateTableAttribute(IEntityType entityType) { - if (_entity.NavigationPropertyInitializerConfigurations.Count > 0) + var tableName = entityType.Relational().TableName; + var schema = entityType.Relational().Schema; + var defaultSchema = entityType.Model.Relational().DefaultSchema; + + var schemaParameterNeeded = schema != null && schema != defaultSchema; + var tableAttributeNeeded = schemaParameterNeeded || tableName != null && tableName != entityType.Scaffolding().DbSetName; + + if (tableAttributeNeeded) { - _sb.AppendLine("public " + _entity.EntityType.Name + "()"); + var tableAttribute = new AttributeWriter(nameof(TableAttribute)); + + tableAttribute.AddParameter(CSharpUtilities.DelimitString(tableName)); + + if (schemaParameterNeeded) + { + tableAttribute.AddParameter($"{nameof(TableAttribute.Schema)} = {CSharpUtilities.DelimitString(schema)}"); + } + + _sb.AppendLine(tableAttribute.ToString()); + } + } + + private void GenerateConstructor(IEntityType entityType) + { + var collectionNavigations = entityType.GetNavigations().Where(n => n.IsCollection()).ToList(); + + if (collectionNavigations.Count > 0) + { + _sb.AppendLine($"public {entityType.Name}()"); _sb.AppendLine("{"); + using (_sb.Indent()) { - foreach (var navPropInitializer in _entity.NavigationPropertyInitializerConfigurations) + foreach (var navigation in collectionNavigations) { - _sb.AppendLine( - navPropInitializer.NavigationPropertyName - + " = new HashSet<" - + navPropInitializer.PrincipalEntityTypeName + ">();"); + _sb.AppendLine($"{navigation.Name} = new HashSet<{navigation.GetTargetType().Name}>();"); } } + _sb.AppendLine("}"); _sb.AppendLine(); } } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddProperties() + private void GenerateProperties(IEntityType entityType) { - foreach (var property in _entity.EntityType.GetProperties().OrderBy(p => p.Scaffolding().ColumnOrdinal)) + foreach (var property in entityType.GetProperties().OrderBy(p => p.Scaffolding().ColumnOrdinal)) { - var propertyConfiguration = _entity.FindPropertyConfiguration(property); - if (propertyConfiguration != null) + if (_useDataAnnotations) { - AddAttributes(propertyConfiguration.AttributeConfigurations); + GeneratePropertyDataAnnotations(property); } - _sb.AppendLine("public " - + CSharpUtilities.GetTypeName(property.ClrType) - + " " + property.Name + " { get; set; }"); + _sb.AppendLine($"public {CSharpUtilities.GetTypeName(property.ClrType)} {property.Name} {{ get; set; }}"); } } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddNavigationProperties() + private void GeneratePropertyDataAnnotations(IProperty property) + { + GenerateKeyAttribute(property); + GenerateRequiredAttribute(property); + GenerateColumnAttribute(property); + GenerateMaxLengthAttribute(property); + } + + private void GenerateKeyAttribute(IProperty property) + { + var key = property.AsProperty().PrimaryKey; + + if (key?.Properties.Count == 1) + { + if (key is Key concreteKey + && key.Properties.SequenceEqual(new KeyDiscoveryConvention().DiscoverKeyProperties(concreteKey.DeclaringEntityType, concreteKey.DeclaringEntityType.GetProperties().ToList()))) + { + return; + } + + if (key.Relational().Name != new RelationalKeyAnnotations(key).GetDefaultName()) + { + return; + } + + _sb.AppendLine(new AttributeWriter(nameof(KeyAttribute))); + } + } + + private void GenerateColumnAttribute(IProperty property) + { + var columnName = property.Relational().ColumnName; + var columnType = property.Relational().ColumnType; + + var delimitedColumnName = columnName != null && columnName != property.Name ? CSharpUtilities.DelimitString(columnName) : null; + var delimitedColumnType = columnType != null ? CSharpUtilities.DelimitString(columnType) : null; + + if ((delimitedColumnName ?? delimitedColumnType) != null) + { + var columnAttribute = new AttributeWriter(nameof(ColumnAttribute)); + + if (delimitedColumnName != null) + { + columnAttribute.AddParameter(delimitedColumnName); + } + + if (delimitedColumnType != null) + { + columnAttribute.AddParameter($"{nameof(ColumnAttribute.TypeName)} = {delimitedColumnType}"); + } + + _sb.AppendLine(columnAttribute); + } + } + + private void GenerateMaxLengthAttribute(IProperty property) { - if (_entity.NavigationPropertyConfigurations.Count > 0) + var maxLength = property.GetMaxLength(); + + if (maxLength.HasValue) + { + var lengthAttribute = new AttributeWriter( + property.ClrType == typeof(string) + ? nameof(StringLengthAttribute) + : nameof(MaxLengthAttribute)); + + lengthAttribute.AddParameter(CSharpUtilities.GenerateLiteral(maxLength.Value)); + + _sb.AppendLine(lengthAttribute.ToString()); + } + } + + private void GenerateRequiredAttribute(IProperty property) + { + if (!property.IsNullable + && property.ClrType.IsNullableType() + && !property.IsPrimaryKey()) + { + _sb.AppendLine(new AttributeWriter(nameof(RequiredAttribute)).ToString()); + } + } + + private void GenerateNavigationProperties(IEntityType entityType) + { + var sortedNavigations = entityType.GetNavigations() + .OrderBy(n => n.IsDependentToPrincipal() ? 0 : 1) + .ThenBy(n => n.IsCollection() ? 1 : 0); + + if (sortedNavigations.Any()) { _sb.AppendLine(); - foreach (var navProp in _entity.NavigationPropertyConfigurations) + + foreach (var navigation in sortedNavigations) { - if (navProp.ErrorAnnotation != null) + if (_useDataAnnotations) { - _sb.AppendLine("// " + navProp.ErrorAnnotation); - } - else - { - AddAttributes(navProp.AttributeConfigurations); - _sb.AppendLine("public " + navProp.Type - + " " + navProp.Name + " { get; set; }"); + GenerateNavigationDataAnnotations(navigation); } + + var referencedTypeName = navigation.GetTargetType().Name; + var navigationType = navigation.IsCollection() ? $"ICollection<{referencedTypeName}>" : referencedTypeName; + _sb.AppendLine($"public {navigationType} {navigation.Name} {{ get; set; }}"); } } } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void AddAttributes( - [NotNull] IEnumerable attributeConfigurations) + private void GenerateNavigationDataAnnotations(INavigation navigation) { - Check.NotNull(attributeConfigurations, nameof(attributeConfigurations)); + GenerateForeignKeyAttribute(navigation); + GenerateInversePropertyAttribute(navigation); + } - if (_entity.ModelConfiguration.UseDataAnnotations) + private void GenerateForeignKeyAttribute(INavigation navigation) + { + if (navigation.IsDependentToPrincipal()) { - foreach (var attrConfig in attributeConfigurations) + if (navigation.ForeignKey.PrincipalKey.IsPrimaryKey()) + { + var foreignKeyAttribute = new AttributeWriter(nameof(ForeignKeyAttribute)); + + foreignKeyAttribute.AddParameter( + CSharpUtilities.DelimitString( + string.Join(",", navigation.ForeignKey.Properties.Select(p => p.Name)))); + + _sb.AppendLine(foreignKeyAttribute.ToString()); + } + } + } + + private void GenerateInversePropertyAttribute(INavigation navigation) + { + if (navigation.ForeignKey.PrincipalKey.IsPrimaryKey()) + { + var inverseNavigation = navigation.FindInverse(); + + if (inverseNavigation != null) { - _sb.AppendLine("[" + attrConfig.AttributeBody + "]"); + var inversePropertyAttribute = new AttributeWriter(nameof(InversePropertyAttribute)); + + inversePropertyAttribute.AddParameter(CSharpUtilities.DelimitString(inverseNavigation.Name)); + + _sb.AppendLine(inversePropertyAttribute.ToString()); } } } + + private class AttributeWriter + { + private readonly string _attibuteName; + private readonly List _parameters = new List(); + + public AttributeWriter([NotNull] string attributeName) + { + Check.NotEmpty(attributeName, nameof(attributeName)); + + _attibuteName = attributeName; + } + + public void AddParameter([NotNull] string parameter) + { + Check.NotEmpty(parameter, nameof(parameter)); + + _parameters.Add(parameter); + } + + public override string ToString() + => "[" + (_parameters.Count == 0 + ? StripAttribute(_attibuteName) + : StripAttribute(_attibuteName) + "(" + string.Join(", ", _parameters) + ")") + "]"; + + private static string StripAttribute([NotNull] string attributeName) + => attributeName.EndsWith("Attribute", StringComparison.Ordinal) + ? attributeName.Substring(0, attributeName.Length - 9) + : attributeName; + } } } diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs index fae46378fc4..bf060f5701c 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs @@ -20,9 +20,11 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// public class ReverseEngineeringGenerator { - private readonly ConfigurationFactory _configurationFactory; private readonly IScaffoldingModelFactory _factory; private static readonly char[] _directorySeparatorChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; + private const string DbContextSuffix = "Context"; + private const string DefaultDbContextName = "Model" + DbContextSuffix; + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -30,15 +32,12 @@ public class ReverseEngineeringGenerator /// public ReverseEngineeringGenerator( [NotNull] IScaffoldingModelFactory scaffoldingModelFactory, - [NotNull] ConfigurationFactory configurationFactory, [NotNull] CodeWriter codeWriter) { Check.NotNull(scaffoldingModelFactory, nameof(scaffoldingModelFactory)); - Check.NotNull(configurationFactory, nameof(configurationFactory)); Check.NotNull(codeWriter, nameof(codeWriter)); _factory = scaffoldingModelFactory; - _configurationFactory = configurationFactory; CodeWriter = codeWriter; } @@ -102,27 +101,26 @@ public virtual Task GenerateAsync( @namespace += "." + string.Join( ".", relativeOutputPath .Split(_directorySeparatorChars, StringSplitOptions.RemoveEmptyEntries) - .Select(p => CSharpUtilities.Instance.GenerateCSharpIdentifier(p, null))); + .Select(p => CSharpUtilities.Instance.GenerateCSharpIdentifier(p, existingIdentifiers: null))); } - //var customConfiguration = _configurationFactory.CreateCustomConfiguration(connectionString, contextName, @namespace, useDataAnnotations); - var modelConfiguration = _configurationFactory.CreateModelConfiguration(model, connectionString, contextName, @namespace, useDataAnnotations); + if (string.IsNullOrEmpty(contextName)) + { + contextName = DefaultDbContextName; - var dbContextClassName = - string.IsNullOrWhiteSpace(contextName) - ? modelConfiguration.ClassName() - : contextName; + var annotatedName = model.Scaffolding().DatabaseName; + if (!string.IsNullOrEmpty(annotatedName)) + { + contextName = CSharpUtilities.Instance.GenerateCSharpIdentifier(annotatedName + DbContextSuffix, existingIdentifiers: null); + } + } - CheckOutputFiles(fullOutputPath, dbContextClassName, model, overwriteFiles); + CheckOutputFiles(fullOutputPath, contextName, model, overwriteFiles); - return CodeWriter.WriteCodeAsync(modelConfiguration, fullOutputPath, dbContextClassName, cancellationToken); + return CodeWriter.WriteCodeAsync(model, fullOutputPath, @namespace, contextName, connectionString, useDataAnnotations, cancellationToken); } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void CheckOutputFiles( + private void CheckOutputFiles( [NotNull] string outputPath, [NotNull] string dbContextClassName, [NotNull] IModel metadataModel, diff --git a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs index 2a6b2f83f4d..dde14ed62c6 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs @@ -25,11 +25,9 @@ public static IServiceCollection AddScaffolding([NotNull] this IServiceCollectio => serviceCollection.AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() diff --git a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingUtilities.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingUtilities.cs deleted file mode 100644 index 59a48f1286b..00000000000 --- a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingUtilities.cs +++ /dev/null @@ -1,195 +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 System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; -using Microsoft.EntityFrameworkCore.Utilities; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class ScaffoldingUtilities - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual string GenerateLambdaToKey( - [NotNull] IReadOnlyList properties, - [NotNull] string lambdaIdentifier) - { - Check.NotNull(properties, nameof(properties)); - Check.NotEmpty(lambdaIdentifier, nameof(lambdaIdentifier)); - - var sb = new StringBuilder(); - - if (properties.Count > 1) - { - sb.Append("new { "); - sb.Append(string.Join(", ", properties.Select(p => lambdaIdentifier + "." + p.Name))); - sb.Append(" }"); - } - else - { - sb.Append(lambdaIdentifier + "." + properties.ElementAt(0).Name); - } - - return sb.ToString(); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual void LayoutRelationshipConfigurationLines( - [NotNull] IndentedStringBuilder sb, - [NotNull] string entityLambdaIdentifier, - [NotNull] RelationshipConfiguration rc, - [NotNull] string dependentEndLambdaIdentifier, - [NotNull] string principalEndLambdaIdentifier) - { - Check.NotNull(sb, nameof(sb)); - Check.NotEmpty(entityLambdaIdentifier, nameof(entityLambdaIdentifier)); - Check.NotNull(rc, nameof(rc)); - Check.NotEmpty(dependentEndLambdaIdentifier, nameof(dependentEndLambdaIdentifier)); - Check.NotEmpty(principalEndLambdaIdentifier, nameof(principalEndLambdaIdentifier)); - - sb.Append(entityLambdaIdentifier); - sb.Append("." + nameof(EntityTypeBuilder.HasOne) + "("); - sb.Append(dependentEndLambdaIdentifier); - sb.Append(" => "); - sb.Append(dependentEndLambdaIdentifier); - sb.Append("."); - sb.Append(rc.DependentEndNavigationPropertyName); - sb.AppendLine(")"); - - using (sb.Indent()) - { - var withMethodName = rc.ForeignKey.IsUnique - ? nameof(ReferenceNavigationBuilder.WithOne) - : nameof(ReferenceNavigationBuilder.WithMany); - sb.Append("." + withMethodName + "("); - if (!string.IsNullOrEmpty(rc.PrincipalEndNavigationPropertyName)) - { - sb.Append(principalEndLambdaIdentifier); - sb.Append(" => "); - sb.Append(principalEndLambdaIdentifier); - sb.Append("."); - sb.Append(rc.PrincipalEndNavigationPropertyName); - } - sb.AppendLine(")"); - - if (!rc.ForeignKey.PrincipalKey.IsPrimaryKey()) - { - var hasPrincipalKeyMethodName = rc.ForeignKey.IsUnique - ? nameof(ReferenceReferenceBuilder.HasPrincipalKey) - : nameof(ReferenceReferenceBuilder.HasPrincipalKey); - sb.Append("." + hasPrincipalKeyMethodName); - if (rc.ForeignKey.IsUnique) - { - // If the relationship is 1:1 need to define to which end - // the PrincipalKey properties belong. - sb.Append("<"); - sb.Append(rc.ForeignKey.PrincipalEntityType.DisplayName()); - sb.Append(">"); - } - sb.Append("(") - .Append(principalEndLambdaIdentifier) - .Append(" => ") - .Append(GenerateLambdaToKey(rc.ForeignKey.PrincipalKey.Properties, principalEndLambdaIdentifier)) - .AppendLine(")"); - } - - var hasForeignKeyMethodName = rc.ForeignKey.IsUnique - ? nameof(ReferenceReferenceBuilder.HasForeignKey) - : nameof(ReferenceCollectionBuilder.HasForeignKey); - sb.Append("." + hasForeignKeyMethodName); - if (rc.ForeignKey.IsUnique) - { - // If the relationship is 1:1 need to define to which end - // the ForeignKey properties belong. - sb.Append("<"); - sb.Append(rc.EntityConfiguration.EntityType.DisplayName()); - sb.Append(">"); - } - - sb.Append("("); - sb.Append(dependentEndLambdaIdentifier); - sb.Append(" => "); - sb.Append(GenerateLambdaToKey(rc.ForeignKey.Properties, dependentEndLambdaIdentifier)); - sb.Append(")"); - - var defaultOnDeleteAction = rc.ForeignKey.IsRequired - ? DeleteBehavior.Cascade - : DeleteBehavior.Restrict; - - if (rc.OnDeleteAction != defaultOnDeleteAction) - { - sb.AppendLine(); - var onDeleteMethodName = rc.ForeignKey.IsUnique - ? nameof(ReferenceReferenceBuilder.OnDelete) - : nameof(ReferenceCollectionBuilder.OnDelete); - sb.Append("." + onDeleteMethodName + "("); - sb.Append(CSharpUtilities.Instance.GenerateLiteral(rc.OnDeleteAction)); - sb.Append(")"); - } - - var foreignKey = rc.ForeignKey as ForeignKey; - if (foreignKey != null - && foreignKey.Relational().Name != - RelationalForeignKeyAnnotations.GetDefaultForeignKeyName( - foreignKey.DeclaringEntityType.Relational().TableName, - foreignKey.PrincipalEntityType.Relational().TableName, - foreignKey.Properties.Select(p => p.Relational().ColumnName))) - { - sb.AppendLine(); - var hasConstraintMethodName = foreignKey.IsUnique - ? nameof(RelationalReferenceReferenceBuilderExtensions.HasConstraintName) - : nameof(RelationalReferenceCollectionBuilderExtensions.HasConstraintName); - sb.Append("." + hasConstraintMethodName + "("); - sb.Append(CSharpUtilities.Instance.DelimitString(foreignKey.Relational().Name)); - sb.Append(")"); - } - - sb.AppendLine(";"); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public virtual IEnumerable OrderedProperties([NotNull] IEntityType entityType) - { - Check.NotNull(entityType, nameof(entityType)); - - var primaryKeyProperties = - ((EntityType)entityType).FindPrimaryKey()?.Properties.ToList() - ?? new List(); - - foreach (var property in primaryKeyProperties) - { - yield return property; - } - - foreach (var property in - entityType.GetProperties() - .Except(primaryKeyProperties) - .OrderBy(p => p.Name, StringComparer.Ordinal)) - { - yield return property; - } - } - } -} diff --git a/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs index d91768973ed..92451ad292a 100644 --- a/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs @@ -4,8 +4,8 @@ using System.Threading; using System.Threading.Tasks; using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Configuration.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -50,33 +50,38 @@ public StringBuilderCodeWriter( /// directly from your code. This API may change or be removed in future releases. /// public override Task WriteCodeAsync( - ModelConfiguration modelConfiguration, + IModel model, string outputPath, - string dbContextClassName, + string @namespace, + string contextName, + string connectionString, + bool useDataAnnotations, CancellationToken cancellationToken = default(CancellationToken)) { - Check.NotNull(modelConfiguration, nameof(modelConfiguration)); + Check.NotNull(model, nameof(model)); Check.NotEmpty(outputPath, nameof(outputPath)); - Check.NotEmpty(dbContextClassName, nameof(dbContextClassName)); + Check.NotEmpty(@namespace, nameof(@namespace)); + Check.NotEmpty(contextName, nameof(contextName)); + Check.NotEmpty(connectionString, nameof(connectionString)); cancellationToken.ThrowIfCancellationRequested(); var resultingFiles = new ReverseEngineerFiles(); - var generatedCode = DbContextWriter.WriteCode(modelConfiguration); + var generatedCode = DbContextWriter.WriteCode(model, @namespace, contextName, connectionString, useDataAnnotations); // output DbContext .cs file - var dbContextFileName = dbContextClassName + FileExtension; + var dbContextFileName = contextName + FileExtension; var dbContextFileFullPath = FileService.OutputFile( outputPath, dbContextFileName, generatedCode); resultingFiles.ContextFile = dbContextFileFullPath; - foreach (var entityConfig in modelConfiguration.EntityConfigurations) + foreach (var entityType in model.GetEntityTypes()) { - generatedCode = EntityTypeWriter.WriteCode(entityConfig); + generatedCode = EntityTypeWriter.WriteCode(entityType, @namespace, useDataAnnotations); // output EntityType poco .cs file - var entityTypeFileName = entityConfig.EntityType.DisplayName() + FileExtension; + var entityTypeFileName = entityType.DisplayName() + FileExtension; var entityTypeFileFullPath = FileService.OutputFile( outputPath, entityTypeFileName, generatedCode); resultingFiles.EntityTypeFiles.Add(entityTypeFileFullPath); diff --git a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs index c59ad0424ee..54de7bac5e5 100644 --- a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs +++ b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs @@ -423,12 +423,9 @@ protected virtual IndexBuilder VisitIndex([NotNull] EntityTypeBuilder builder, [ // an extra index in the model. But if the index name does not // match what would be produced by default then need to call // HasName() on the primary key. - if (index.Name != - RelationalKeyAnnotations - .GetDefaultKeyName( - index.Table.Name, - true, /* is primary key */ - primaryKeyColumns.Select(GetPropertyName))) + var key = builder.Metadata.FindPrimaryKey(); + + if (index.Name != new RelationalKeyAnnotations(key).GetDefaultName()) { builder.HasKey(propertyNames).HasName(index.Name); } diff --git a/src/EFCore.Relational/Metadata/RelationalKeyAnnotations.cs b/src/EFCore.Relational/Metadata/RelationalKeyAnnotations.cs index 9dcbb833298..4a27d5413fd 100644 --- a/src/EFCore.Relational/Metadata/RelationalKeyAnnotations.cs +++ b/src/EFCore.Relational/Metadata/RelationalKeyAnnotations.cs @@ -46,13 +46,13 @@ protected virtual bool SetName([CanBeNull] string value) RelationalAnnotationNames.Name, Check.NullButNotEmpty(value, nameof(value))); - protected virtual string GetDefaultName() + public virtual string GetDefaultName() => GetDefaultKeyName( GetAnnotations(Key.DeclaringEntityType).TableName, Key.IsPrimaryKey(), Key.Properties.Select(p => GetAnnotations(p).ColumnName)); - public static string GetDefaultKeyName( + private static string GetDefaultKeyName( [NotNull] string tableName, bool primaryKey, [NotNull] IEnumerable propertyNames) { Check.NotEmpty(tableName, nameof(tableName)); diff --git a/src/EFCore.Relational/breakingchanges.netcore.json b/src/EFCore.Relational/breakingchanges.netcore.json index abad385bca2..074901b0630 100644 --- a/src/EFCore.Relational/breakingchanges.netcore.json +++ b/src/EFCore.Relational/breakingchanges.netcore.json @@ -1,1401 +1,3010 @@ - [ - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T0 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T1 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression : System.Linq.Expressions.Expression", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator : Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseCreator, Microsoft.EntityFrameworkCore.Internal.IServiceInjectionSite", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.DatabaseProviderServices, Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression : System.Linq.Expressions.Expression", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InnerJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LeftOuterJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.NotNullableExpression : System.Linq.Expressions.Expression", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbCommandLogData : System.Collections.Generic.IEnumerable>", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbParameterLogData", - "Kind": "Removal" - }, - { - "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.RelationalEventId", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.IDatabaseProviderServices", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.Infrastructure.RelationalServiceCollectionExtensions", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.WarningConfigurationBuilderExtensions", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", - "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Void Close()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Void Open()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", - "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IReadOnlyList parameters)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "Microsoft.EntityFrameworkCore.Storage.RelationalDataReader ExecuteReader(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "System.Int32 ExecuteNonQuery(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "System.Object ExecuteScalar(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "System.Threading.Tasks.Task ExecuteReaderAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "System.Threading.Tasks.Task ExecuteNonQueryAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", - "MemberId": "System.Threading.Tasks.Task ExecuteScalarAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMemberTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator", - "MemberId": "protected .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", - "MemberId": "protected .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.Extensions.Logging.ILogger logger)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "protected virtual Microsoft.Extensions.Logging.ILogger get_Logger()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "public Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "public System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "public System.Void Close()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "public System.Void Open()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", - "MemberId": "public System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IIndex index, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IKey key, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "protected virtual System.Boolean SetDatabaseName(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "public System.String get_DatabaseName()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "public virtual System.Void set_DatabaseName(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", - "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Migrations.HistoryRepository : Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator databaseCreator, Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder rawSqlCommandBuilder, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer modelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator migrationsSqlGenerator, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory get_ParameterNameGeneratorFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory get_CommandBuilderFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_RelationalTypeMapper()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Update.UpdateSqlGenerator : Microsoft.EntityFrameworkCore.Update.IUpdateSqlGenerator", - "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMethodCallTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator", - "MemberId": "protected .ctor(Microsoft.Extensions.Logging.ILogger logger)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", - "MemberId": "protected override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression node)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", - "MemberId": "public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression node)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", - "MemberId": "protected override System.Void IncludeNavigations(Microsoft.EntityFrameworkCore.Query.IncludeSpecification includeSpecification, System.Type resultType, System.Linq.Expressions.Expression accessorExpression, System.Boolean querySourceRequiresTracking)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", - "MemberId": "protected override System.Void IncludeNavigations(Remotion.Linq.QueryModel queryModel, System.Collections.Generic.IReadOnlyCollection includeSpecifications)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", - "MemberId": "protected virtual System.Void OptimizeJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, System.Int32 index, System.Action baseVisitAction, System.Reflection.MethodInfo operatorToFlatten, System.Boolean groupJoin = False)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", - "MemberId": "protected virtual System.Void WarnClientEval(System.Object expression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor parentQueryModelVisitor)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions get_ContextOptions()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalAnnotationProvider()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory get_CompositePredicateExpressionVisitorFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory get_ConditionalRemovingExpressionVisitorFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory get_IncludeExpressionVisitorFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory get_QueryFlattenerFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory get_SqlTranslatingExpressionVisitorFactory()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_Annotations()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_TypeMapper()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalExtensions()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.ValueGeneration.IValueGeneratorCache cache, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalExtensions)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "protected virtual System.Linq.Expressions.Expression VisitNotIn(Microsoft.EntityFrameworkCore.Query.Expressions.InExpression inExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "protected virtual System.String get_ConcatOperator()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "protected virtual System.Void VisitProjection(System.Collections.Generic.IReadOnlyList projections)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory relationalCommandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression selectExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", - "MemberId": "public virtual System.Linq.Expressions.Expression VisitIsNotNull(Microsoft.EntityFrameworkCore.Query.Expressions.IsNullExpression isNotNullExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Boolean value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte[] value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Char value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Data.DbType value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTime value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTimeOffset value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Decimal value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Double value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Enum value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Guid value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int16 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int32 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int64 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Object value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.Single value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String GenerateLiteralValue(System.TimeSpan value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DateTimeFormat()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DateTimeFormatString()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DateTimeOffsetFormat()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DateTimeOffsetFormatString()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DecimalFormat()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_DecimalFormatString()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.String get_FloatingPointFormatString()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Boolean value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte[] value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Char value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Data.DbType value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTime value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTimeOffset value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Decimal value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Double value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Enum value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Guid value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int16 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int32 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int64 value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Object value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Single value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.TimeSpan value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "public System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "public System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeExpressionFragmentTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsAnnotationProvider : Microsoft.EntityFrameworkCore.Migrations.IMigrationsAnnotationProvider", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.ParameterNameGeneratorFactory : Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.TypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.UntypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", - "MemberId": "public .ctor()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext : Microsoft.EntityFrameworkCore.Query.QueryCompilationContext", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.ILinqOperatorProvider linqOperatorProvider, Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider queryMethodProvider, System.Type contextType, System.Boolean trackQueryResults)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory : Microsoft.EntityFrameworkCore.Query.Internal.QueryCompilationContextFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodInfoBasedNodeTypeRegistry methodInfoBasedNodeTypeRegistry, Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext currentContext)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.EntityQueryableExpressionVisitor", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", - "MemberId": "public Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor : Remotion.Linq.Parsing.ThrowingExpressionVisitor", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression subQuery)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, System.Collections.Generic.IReadOnlyList values)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression get_Operand()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDatabase : Microsoft.EntityFrameworkCore.Storage.Database", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.IQueryCompilationContextFactory queryCompilationContextFactory, Microsoft.EntityFrameworkCore.Update.ICommandBatchPreparer batchPreparer, Microsoft.EntityFrameworkCore.Update.IBatchExecutor batchExecutor, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpressionFactory : Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, System.String alias)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression AddToOrderBy(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase table, Remotion.Linq.Clauses.OrderingDirection orderingDirection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddAliasToProjection(System.String alias, System.Linq.Expressions.Expression expression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression aliasExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression columnExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression, System.Boolean resetProjectStar)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Int32 AddToProjection(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Remotion.Linq.Clauses.IQuerySource querySource)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Linq.Expressions.Expression UpdateColumnExpression(System.Linq.Expressions.Expression expression, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.String get_ProjectStarAlias()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddCrossJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddTable(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Boolean createUniqueAlias = True)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddTables(System.Collections.Generic.IEnumerable tableExpressions)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddToOrderBy(Remotion.Linq.Clauses.Ordering ordering)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void AddToOrderBy(System.Collections.Generic.IEnumerable orderings)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void ClearColumnProjections()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void RemoveFromProjection(System.Collections.Generic.IEnumerable orderBy)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void set_ProjectStarAlias(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void SetProjectionConditionalExpression(System.Linq.Expressions.ConditionalExpression conditionalExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDataReader : System.IDisposable", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader reader)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure", - "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.Extensions.Logging.ILogger logger, System.Boolean transactionOwned)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public .ctor(System.Func queryBufferFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Internal.LazyRef stateManager, Microsoft.EntityFrameworkCore.Internal.IConcurrencyDetector concurrencyDetector, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategyFactory executionStrategyFactory)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Storage.ValueBuffer GetIncludeValueBuffer(System.Int32 queryIndex)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Threading.SemaphoreSlim get_Semaphore()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Threading.Tasks.Task RegisterValueBufferCursorAsync(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex, System.Threading.CancellationToken cancellationToken)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Void BeginIncludeScope()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Void DeregisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Void EndIncludeScope()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", - "MemberId": "public virtual System.Void RegisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Boolean get_IsProjected()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Linq.Expressions.Expression get_SourceExpression()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Reflection.MemberInfo get_SourceMember()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_Alias(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_IsProjected(System.Boolean value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_SourceExpression(System.Linq.Expressions.Expression value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_SourceMember(System.Reflection.MemberInfo value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", - "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Linq.Expressions.Expression get_Expression()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Update.ModificationCommand", - "MemberId": "public .ctor(System.String name, System.String schema, System.Func generateParameterName, System.Func getPropertyExtensions)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", - "MemberId": "public .ctor(System.String name, System.Type type, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Boolean get_IsNullable()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.String get_TableAlias()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_IsNullable(System.Boolean value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public abstract System.Void ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_CommandTimeout(System.Nullable value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_Connection(System.Data.Common.DbConnection value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_ConnectionString(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_ExecutionStrategyFactory(System.Func value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_MaxBatchSize(System.Nullable value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_MigrationsAssembly(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_MigrationsHistoryTableName(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_MigrationsHistoryTableSchema(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public virtual System.Void set_UseRelationalNulls(System.Boolean value)", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapperExtensions", - "MemberId": "public static System.Boolean IsTypeMapped(this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, System.Type clrType)", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", - "MemberId": "public static System.Int32 ExecuteSqlCommand(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, params System.Object[] parameters)", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", - "MemberId": "public static System.Threading.Tasks.Task ExecuteSqlCommandAsync(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), params System.Object[] parameters)", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalQueryableExtensions", - "MemberId": "public static System.Linq.IQueryable FromSql(this System.Linq.IQueryable source, System.String sql, params System.Object[] parameters) where T0 : class", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Type get_GroupJoinIncludeType()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Type get_GroupJoinIncludeType()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String column, System.String schema = null, System.Boolean unique = False)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", - "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String[] columns, System.String schema = null, System.Boolean unique = False)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", - "MemberId": "public virtual System.Boolean CanSetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", - "MemberId": "public virtual System.Boolean SetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", - "MemberId": "public virtual System.Object GetAnnotation(System.String fallbackAnnotationName, System.String primaryAnnotationName)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Collections.Generic.IReadOnlyCollection get_Arguments()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", - "MemberId": "public virtual System.Void set_FunctionName(System.String value)", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Linq.Expressions.Expression get_Predicate()", - "Kind": "Removal" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", - "MemberId": "public virtual System.Void set_Predicate(System.Linq.Expressions.Expression value)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Reflection.MethodInfo get_IncludeMethod()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Type get_GroupJoinIncludeType()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", - "MemberId": "System.Type get_RelatedEntitiesLoaderType()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", - "MemberId": "System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", - "MemberId": "System.String get_DatabaseName()", - "Kind": "Removal" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", - "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean inProjection = False)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", - "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IEnumerable parameters)", - "Kind": "Addition" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "protected abstract Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension Clone()", - "Kind": "Addition" - }, - { - "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", - "MemberId": "public abstract System.Boolean ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Boolean Close()", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Boolean Open()", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Guid get_ConnectionId()", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Threading.SemaphoreSlim get_Semaphore()", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Threading.Tasks.Task RegisterBufferableAsync(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable, System.Threading.CancellationToken cancellationToken)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", - "MemberId": "System.Void RegisterBufferable(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitColumnReference(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnReferenceExpression columnReferenceExpression)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitCrossJoinLateral(Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinLateralExpression crossJoinLateralExpression)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", - "MemberId": "System.Linq.Expressions.Expression VisitSqlFragment(Microsoft.EntityFrameworkCore.Query.Expressions.SqlFragmentExpression sqlFragmentExpression)", - "Kind": "Addition" - }, - { - "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", - "MemberId": "System.String get_Filter()", - "Kind": "Addition" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", - "MemberId": "public .ctor(System.String storeType, System.Type clrType)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", - "MemberId": "public .ctor(System.String storeType, System.Type clrType, System.Nullable dbType)", - "Kind": "Removal" - } - ] +[ + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T0 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T1 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator : Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseCreator, Microsoft.EntityFrameworkCore.Internal.IServiceInjectionSite", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.DatabaseProviderServices, Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InnerJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LeftOuterJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.NotNullableExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbCommandLogData : System.Collections.Generic.IEnumerable>", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbParameterLogData", + "Kind": "Removal" + }, + { + "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.RelationalEventId", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.IDatabaseProviderServices", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.Infrastructure.RelationalServiceCollectionExtensions", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.WarningConfigurationBuilderExtensions", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void Close()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void Open()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", + "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IReadOnlyList parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "Microsoft.EntityFrameworkCore.Storage.RelationalDataReader ExecuteReader(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "System.Int32 ExecuteNonQuery(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "System.Object ExecuteScalar(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "System.Threading.Tasks.Task ExecuteReaderAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "System.Threading.Tasks.Task ExecuteNonQueryAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalCommand", + "MemberId": "System.Threading.Tasks.Task ExecuteScalarAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Collections.Generic.IReadOnlyDictionary parameterValues, System.Boolean manageConnection, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMemberTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator", + "MemberId": "protected .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", + "MemberId": "protected .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.Extensions.Logging.ILogger logger)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "protected virtual Microsoft.Extensions.Logging.ILogger get_Logger()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void Close()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void Open()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IIndex index, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IKey key, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected virtual System.Boolean SetDatabaseName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public System.String get_DatabaseName()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public virtual System.Void set_DatabaseName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Migrations.HistoryRepository : Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator databaseCreator, Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder rawSqlCommandBuilder, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer modelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator migrationsSqlGenerator, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory get_ParameterNameGeneratorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory get_CommandBuilderFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_RelationalTypeMapper()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Update.UpdateSqlGenerator : Microsoft.EntityFrameworkCore.Update.IUpdateSqlGenerator", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMethodCallTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator", + "MemberId": "protected .ctor(Microsoft.Extensions.Logging.ILogger logger)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "protected override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression node)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression node)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected override System.Void IncludeNavigations(Microsoft.EntityFrameworkCore.Query.IncludeSpecification includeSpecification, System.Type resultType, System.Linq.Expressions.Expression accessorExpression, System.Boolean querySourceRequiresTracking)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected override System.Void IncludeNavigations(Remotion.Linq.QueryModel queryModel, System.Collections.Generic.IReadOnlyCollection includeSpecifications)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected virtual System.Void OptimizeJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, System.Int32 index, System.Action baseVisitAction, System.Reflection.MethodInfo operatorToFlatten, System.Boolean groupJoin = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected virtual System.Void WarnClientEval(System.Object expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor parentQueryModelVisitor)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions get_ContextOptions()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalAnnotationProvider()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory get_CompositePredicateExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory get_ConditionalRemovingExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory get_IncludeExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory get_QueryFlattenerFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory get_SqlTranslatingExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_Annotations()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_TypeMapper()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalExtensions()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.ValueGeneration.IValueGeneratorCache cache, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalExtensions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.Linq.Expressions.Expression VisitNotIn(Microsoft.EntityFrameworkCore.Query.Expressions.InExpression inExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.String get_ConcatOperator()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.Void VisitProjection(System.Collections.Generic.IReadOnlyList projections)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory relationalCommandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression selectExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public virtual System.Linq.Expressions.Expression VisitIsNotNull(Microsoft.EntityFrameworkCore.Query.Expressions.IsNullExpression isNotNullExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_FloatingPointFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeExpressionFragmentTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsAnnotationProvider : Microsoft.EntityFrameworkCore.Migrations.IMigrationsAnnotationProvider", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.ParameterNameGeneratorFactory : Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.TypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.UntypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext : Microsoft.EntityFrameworkCore.Query.QueryCompilationContext", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.ILinqOperatorProvider linqOperatorProvider, Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider queryMethodProvider, System.Type contextType, System.Boolean trackQueryResults)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory : Microsoft.EntityFrameworkCore.Query.Internal.QueryCompilationContextFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodInfoBasedNodeTypeRegistry methodInfoBasedNodeTypeRegistry, Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext currentContext)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.EntityQueryableExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "public Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor : Remotion.Linq.Parsing.ThrowingExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression subQuery)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, System.Collections.Generic.IReadOnlyList values)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression get_Operand()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDatabase : Microsoft.EntityFrameworkCore.Storage.Database", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.IQueryCompilationContextFactory queryCompilationContextFactory, Microsoft.EntityFrameworkCore.Update.ICommandBatchPreparer batchPreparer, Microsoft.EntityFrameworkCore.Update.IBatchExecutor batchExecutor, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpressionFactory : Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, System.String alias)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression AddToOrderBy(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase table, Remotion.Linq.Clauses.OrderingDirection orderingDirection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddAliasToProjection(System.String alias, System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression aliasExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression columnExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression, System.Boolean resetProjectStar)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Linq.Expressions.Expression UpdateColumnExpression(System.Linq.Expressions.Expression expression, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.String get_ProjectStarAlias()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddCrossJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddTable(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Boolean createUniqueAlias = True)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddTables(System.Collections.Generic.IEnumerable tableExpressions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddToOrderBy(Remotion.Linq.Clauses.Ordering ordering)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddToOrderBy(System.Collections.Generic.IEnumerable orderings)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void ClearColumnProjections()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void RemoveFromProjection(System.Collections.Generic.IEnumerable orderBy)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void set_ProjectStarAlias(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void SetProjectionConditionalExpression(System.Linq.Expressions.ConditionalExpression conditionalExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDataReader : System.IDisposable", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader reader)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.Extensions.Logging.ILogger logger, System.Boolean transactionOwned)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public .ctor(System.Func queryBufferFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Internal.LazyRef stateManager, Microsoft.EntityFrameworkCore.Internal.IConcurrencyDetector concurrencyDetector, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategyFactory executionStrategyFactory)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Storage.ValueBuffer GetIncludeValueBuffer(System.Int32 queryIndex)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Threading.SemaphoreSlim get_Semaphore()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Threading.Tasks.Task RegisterValueBufferCursorAsync(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex, System.Threading.CancellationToken cancellationToken)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void BeginIncludeScope()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void DeregisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void EndIncludeScope()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void RegisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Boolean get_IsProjected()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Linq.Expressions.Expression get_SourceExpression()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Reflection.MemberInfo get_SourceMember()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_Alias(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_IsProjected(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_SourceExpression(System.Linq.Expressions.Expression value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_SourceMember(System.Reflection.MemberInfo value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Linq.Expressions.Expression get_Expression()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Update.ModificationCommand", + "MemberId": "public .ctor(System.String name, System.String schema, System.Func generateParameterName, System.Func getPropertyExtensions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.String name, System.Type type, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Boolean get_IsNullable()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.String get_TableAlias()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_IsNullable(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public abstract System.Void ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_CommandTimeout(System.Nullable value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_Connection(System.Data.Common.DbConnection value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_ConnectionString(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_ExecutionStrategyFactory(System.Func value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MaxBatchSize(System.Nullable value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsAssembly(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsHistoryTableName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsHistoryTableSchema(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_UseRelationalNulls(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapperExtensions", + "MemberId": "public static System.Boolean IsTypeMapped(this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, System.Type clrType)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", + "MemberId": "public static System.Int32 ExecuteSqlCommand(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, params System.Object[] parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", + "MemberId": "public static System.Threading.Tasks.Task ExecuteSqlCommandAsync(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), params System.Object[] parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalQueryableExtensions", + "MemberId": "public static System.Linq.IQueryable FromSql(this System.Linq.IQueryable source, System.String sql, params System.Object[] parameters) where T0 : class", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String column, System.String schema = null, System.Boolean unique = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String[] columns, System.String schema = null, System.Boolean unique = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Boolean CanSetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Boolean SetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Object GetAnnotation(System.String fallbackAnnotationName, System.String primaryAnnotationName)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Collections.Generic.IReadOnlyCollection get_Arguments()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_FunctionName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Linq.Expressions.Expression get_Predicate()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void set_Predicate(System.Linq.Expressions.Expression value)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "System.String get_DatabaseName()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean inProjection = False)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", + "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IEnumerable parameters)", + "Kind": "Addition" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "protected abstract Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension Clone()", + "Kind": "Addition" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public abstract System.Boolean ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Boolean Close()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Boolean Open()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Guid get_ConnectionId()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.SemaphoreSlim get_Semaphore()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task RegisterBufferableAsync(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable, System.Threading.CancellationToken cancellationToken)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void RegisterBufferable(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitColumnReference(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnReferenceExpression columnReferenceExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitCrossJoinLateral(Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinLateralExpression crossJoinLateralExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitSqlFragment(Microsoft.EntityFrameworkCore.Query.Expressions.SqlFragmentExpression sqlFragmentExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "System.String get_Filter()", + "Kind": "Addition" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T0 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalDbContextOptionsBuilder where T1 : Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator : Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseCreator, Microsoft.EntityFrameworkCore.Internal.IServiceInjectionSite", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.DatabaseProviderServices, Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InnerJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.LeftOuterJoinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.NotNullableExpression : System.Linq.Expressions.Expression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression : Microsoft.EntityFrameworkCore.Query.Expressions.AggregateExpression", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbCommandLogData : System.Collections.Generic.IEnumerable>", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.DbParameterLogData", + "Kind": "Removal" + }, + { + "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.RelationalEventId", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalDatabaseProviderServices : Microsoft.EntityFrameworkCore.Storage.IDatabaseProviderServices", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.Infrastructure.RelationalServiceCollectionExtensions", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.WarningConfigurationBuilderExtensions", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", + "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IReadOnlyList parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMemberTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator", + "MemberId": "protected .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapper : Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", + "MemberId": "protected .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.Extensions.Logging.ILogger logger)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "protected virtual Microsoft.Extensions.Logging.ILogger get_Logger()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void Close()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void Open()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalEntityTypeAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalEntityTypeAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalForeignKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalForeignKeyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IForeignKey foreignKey, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalIndexAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IIndex index, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IKey key, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "protected virtual System.Boolean SetDatabaseName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public System.String get_DatabaseName()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "public virtual System.Void set_DatabaseName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations annotations, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "protected readonly Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames ProviderFullAnnotationNames", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalPropertyAnnotations", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames providerFullAnnotationNames)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Migrations.HistoryRepository : Microsoft.EntityFrameworkCore.Migrations.IHistoryRepository", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IDatabaseCreator databaseCreator, Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder rawSqlCommandBuilder, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions options, Microsoft.EntityFrameworkCore.Migrations.IMigrationsModelDiffer modelDiffer, Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator migrationsSqlGenerator, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory get_ParameterNameGeneratorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory get_CommandBuilderFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_RelationalTypeMapper()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Sql.QuerySqlGeneratorFactoryBase : Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Update.UpdateSqlGenerator : Microsoft.EntityFrameworkCore.Update.IUpdateSqlGenerator", + "MemberId": "protected .ctor(Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeMethodCallTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator", + "MemberId": "protected .ctor(Microsoft.Extensions.Logging.ILogger logger)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "protected override System.Linq.Expressions.Expression VisitMethodCall(System.Linq.Expressions.MethodCallExpression node)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ProjectionExpressionVisitor", + "MemberId": "public override System.Linq.Expressions.Expression Visit(System.Linq.Expressions.Expression node)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected override System.Void IncludeNavigations(Microsoft.EntityFrameworkCore.Query.IncludeSpecification includeSpecification, System.Type resultType, System.Linq.Expressions.Expression accessorExpression, System.Boolean querySourceRequiresTracking)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected override System.Void IncludeNavigations(Remotion.Linq.QueryModel queryModel, System.Collections.Generic.IReadOnlyCollection includeSpecifications)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected virtual System.Void OptimizeJoinClause(Remotion.Linq.Clauses.JoinClause joinClause, Remotion.Linq.QueryModel queryModel, System.Int32 index, System.Action baseVisitAction, System.Reflection.MethodInfo operatorToFlatten, System.Boolean groupJoin = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "protected virtual System.Void WarnClientEval(System.Object expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor parentQueryModelVisitor)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions get_ContextOptions()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalAnnotationProvider()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory get_CompositePredicateExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory get_ConditionalRemovingExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory get_IncludeExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory get_QueryFlattenerFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory get_SqlTranslatingExpressionVisitorFactory()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitorFactory : Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Internal.IQueryOptimizer queryOptimizer, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.INavigationRewritingExpressionVisitorFactory navigationRewritingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ISubQueryMemberPushDownExpressionVisitor subQueryMemberPushDownExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQuerySourceTracingExpressionVisitorFactory querySourceTracingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IEntityResultFindingExpressionVisitorFactory entityResultFindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ITaskBlockingExpressionVisitor taskBlockingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMemberAccessBindingExpressionVisitorFactory memberAccessBindingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IOrderingExpressionVisitorFactory orderingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory projectionExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory entityQueryableExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.IQueryAnnotationExtractor queryAnnotationExtractor, Microsoft.EntityFrameworkCore.Query.IResultOperatorHandler resultOperatorHandler, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource, Microsoft.EntityFrameworkCore.Query.Internal.IExpressionPrinter expressionPrinter, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IIncludeExpressionVisitorFactory includeExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.ICompositePredicateExpressionVisitorFactory compositePredicateExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IConditionalRemovingExpressionVisitorFactory conditionalRemovingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IQueryFlattenerFactory queryFlattenerFactory, Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptions contextOptions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_Annotations()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper get_TypeMapper()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper get_SqlGenerationHelper()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory commandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider annotations)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider get_RelationalExtensions()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.ValueGeneration.RelationalValueGeneratorSelector : Microsoft.EntityFrameworkCore.ValueGeneration.ValueGeneratorSelector", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.ValueGeneration.IValueGeneratorCache cache, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalExtensions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.Linq.Expressions.Expression VisitNotIn(Microsoft.EntityFrameworkCore.Query.Expressions.InExpression inExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.String get_ConcatOperator()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "protected virtual System.Void VisitProjection(System.Collections.Generic.IReadOnlyList projections)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalCommandBuilderFactory relationalCommandBuilderFactory, Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper sqlGenerationHelper, Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory parameterNameGeneratorFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression selectExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Sql.DefaultQuerySqlGenerator : Remotion.Linq.Parsing.ThrowingExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor, Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGenerator", + "MemberId": "public virtual System.Linq.Expressions.Expression VisitIsNotNull(Microsoft.EntityFrameworkCore.Query.Expressions.IsNullExpression isNotNullExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.RelationalCompositeExpressionFragmentTranslator : Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationsAnnotationProvider : Microsoft.EntityFrameworkCore.Migrations.IMigrationsAnnotationProvider", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.ParameterNameGeneratorFactory : Microsoft.EntityFrameworkCore.Storage.IParameterNameGeneratorFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.TypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.UntypedRelationalValueBufferFactoryFactory : Microsoft.EntityFrameworkCore.Storage.IRelationalValueBufferFactoryFactory", + "MemberId": "public .ctor()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext : Microsoft.EntityFrameworkCore.Query.QueryCompilationContext", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Query.Internal.ILinqOperatorProvider linqOperatorProvider, Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider queryMethodProvider, System.Type contextType, System.Boolean trackQueryResults)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContextFactory : Microsoft.EntityFrameworkCore.Query.Internal.QueryCompilationContextFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Infrastructure.ISensitiveDataLogger logger, Microsoft.EntityFrameworkCore.Query.IEntityQueryModelVisitorFactory entityQueryModelVisitorFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IRequiresMaterializationExpressionVisitorFactory requiresMaterializationExpressionVisitorFactory, Remotion.Linq.Parsing.Structure.NodeTypeProviders.MethodInfoBasedNodeTypeRegistry methodInfoBasedNodeTypeRegistry, Microsoft.EntityFrameworkCore.Internal.ICurrentDbContext currentContext)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IEntityQueryableExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalEntityQueryableExpressionVisitor : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.EntityQueryableExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory selectExpressionFactory, Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.IMaterializerFactory materializerFactory, Microsoft.EntityFrameworkCore.Query.Internal.IShaperCommandContextFactory shaperCommandContextFactory, Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "public Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor : Remotion.Linq.Parsing.ThrowingExpressionVisitor", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Metadata.IRelationalAnnotationProvider relationalAnnotationProvider, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IExpressionFragmentTranslator compositeExpressionFragmentTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMethodCallTranslator methodCallTranslator, Microsoft.EntityFrameworkCore.Query.ExpressionTranslators.IMemberTranslator memberTranslator, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper relationalTypeMapper, Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean bindParentQueries = False, System.Boolean inProjection = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression subQuery)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression operand, System.Collections.Generic.IReadOnlyList values)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.InExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression get_Operand()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.RelationalProjectionExpressionVisitorFactory : Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.IProjectionExpressionVisitorFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory sqlTranslatingExpressionVisitorFactory, Microsoft.EntityFrameworkCore.Metadata.Internal.IEntityMaterializerSource entityMaterializerSource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDatabase : Microsoft.EntityFrameworkCore.Storage.Database", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.IQueryCompilationContextFactory queryCompilationContextFactory, Microsoft.EntityFrameworkCore.Update.ICommandBatchPreparer batchPreparer, Microsoft.EntityFrameworkCore.Update.IBatchExecutor batchExecutor, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpressionFactory : Microsoft.EntityFrameworkCore.Query.Expressions.ISelectExpressionFactory", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Query.Sql.IQuerySqlGeneratorFactory querySqlGeneratorFactory, Microsoft.EntityFrameworkCore.Query.RelationalQueryCompilationContext queryCompilationContext, System.String alias)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression AddToOrderBy(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase table, Remotion.Linq.Clauses.OrderingDirection orderingDirection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddInnerJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase AddLeftOuterJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddAliasToProjection(System.String alias, System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression aliasExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression columnExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.Linq.Expressions.Expression expression, System.Boolean resetProjectStar)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Int32 AddToProjection(System.String column, Microsoft.EntityFrameworkCore.Metadata.IProperty property, Remotion.Linq.Clauses.IQuerySource querySource)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Linq.Expressions.Expression UpdateColumnExpression(System.Linq.Expressions.Expression expression, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.String get_ProjectStarAlias()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddCrossJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Collections.Generic.IEnumerable projection)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddTable(Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression, System.Boolean createUniqueAlias = True)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddTables(System.Collections.Generic.IEnumerable tableExpressions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddToOrderBy(Remotion.Linq.Clauses.Ordering ordering)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void AddToOrderBy(System.Collections.Generic.IEnumerable orderings)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void ClearColumnProjections()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void RemoveFromProjection(System.Collections.Generic.IEnumerable orderBy)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void set_ProjectStarAlias(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void SetProjectionConditionalExpression(System.Linq.Expressions.ConditionalExpression conditionalExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalDataReader : System.IDisposable", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader reader)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTransaction : Microsoft.EntityFrameworkCore.Storage.IDbContextTransaction, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure", + "MemberId": "public .ctor(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbTransaction transaction, Microsoft.Extensions.Logging.ILogger logger, System.Boolean transactionOwned)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public .ctor(System.Func queryBufferFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Internal.LazyRef stateManager, Microsoft.EntityFrameworkCore.Internal.IConcurrencyDetector concurrencyDetector, Microsoft.EntityFrameworkCore.Storage.IExecutionStrategyFactory executionStrategyFactory)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Storage.ValueBuffer GetIncludeValueBuffer(System.Int32 queryIndex)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Threading.Tasks.Task RegisterValueBufferCursorAsync(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex, System.Threading.CancellationToken cancellationToken)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void BeginIncludeScope()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void EndIncludeScope()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void RegisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor, System.Nullable queryIndex)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Boolean get_IsProjected()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Linq.Expressions.Expression get_SourceExpression()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Reflection.MemberInfo get_SourceMember()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_Alias(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_IsProjected(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_SourceExpression(System.Linq.Expressions.Expression value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.AliasExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_SourceMember(System.Reflection.MemberInfo value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.Linq.Expressions.Expression expression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ExistsExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Linq.Expressions.Expression get_Expression()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Update.ModificationCommand", + "MemberId": "public .ctor(System.String name, System.String schema, System.Func generateParameterName, System.Func getPropertyExtensions)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public .ctor(System.String name, System.Type type, Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase tableExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Boolean get_IsNullable()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.String get_TableAlias()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.ColumnExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_IsNullable(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public abstract System.Void ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_CommandTimeout(System.Nullable value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_Connection(System.Data.Common.DbConnection value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_ConnectionString(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_ExecutionStrategyFactory(System.Func value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MaxBatchSize(System.Nullable value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsAssembly(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsHistoryTableName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_MigrationsHistoryTableSchema(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public virtual System.Void set_UseRelationalNulls(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalQueryableExtensions", + "MemberId": "public static System.Linq.IQueryable FromSql(this System.Linq.IQueryable source, System.String sql, params System.Object[] parameters) where T0 : class", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", + "MemberId": "public static System.Threading.Tasks.Task ExecuteSqlCommandAsync(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), params System.Object[] parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.AsyncQueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.QueryMethodProvider : Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "public System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String column, System.String schema = null, System.Boolean unique = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Migrations.MigrationBuilder", + "MemberId": "public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder CreateIndex(System.String name, System.String table, System.String[] columns, System.String schema = null, System.Boolean unique = False)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Boolean CanSetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Boolean SetAnnotation(System.String relationalAnnotationName, System.String providerAnnotationName, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalAnnotations", + "MemberId": "public virtual System.Object GetAnnotation(System.String fallbackAnnotationName, System.String primaryAnnotationName)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Collections.Generic.IReadOnlyCollection get_Arguments()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.Expressions.SqlFunctionExpression : System.Linq.Expressions.Expression", + "MemberId": "public virtual System.Void set_FunctionName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Linq.Expressions.Expression get_Predicate()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Query.Expressions.JoinExpressionBase : Microsoft.EntityFrameworkCore.Query.Expressions.TableExpressionBase", + "MemberId": "public virtual System.Void set_Predicate(System.Linq.Expressions.Expression value)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitCount(Microsoft.EntityFrameworkCore.Query.Expressions.CountExpression countExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitLateralJoin(Microsoft.EntityFrameworkCore.Query.Expressions.LateralJoinExpression lateralJoinExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitMax(Microsoft.EntityFrameworkCore.Query.Expressions.MaxExpression maxExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitMin(Microsoft.EntityFrameworkCore.Query.Expressions.MinExpression minExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitSum(Microsoft.EntityFrameworkCore.Query.Expressions.SumExpression sumExpression)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Object CreateGroupJoinInclude(System.Collections.Generic.IReadOnlyList navigationPath, System.Boolean querySourceRequiresTracking, System.Object existingGroupJoinInclude, System.Object relatedEntitiesLoaders)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_CreateCollectionRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_CreateReferenceRelatedEntitiesLoaderMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Reflection.MethodInfo get_IncludeMethod()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Type get_GroupJoinIncludeType()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.IQueryMethodProvider", + "MemberId": "System.Type get_RelatedEntitiesLoaderType()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalModelAnnotations", + "MemberId": "System.String get_DatabaseName()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void Close()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void Open()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.ISqlTranslatingExpressionVisitorFactory", + "MemberId": "Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.SqlTranslatingExpressionVisitor Create(Microsoft.EntityFrameworkCore.Query.RelationalQueryModelVisitor queryModelVisitor, Microsoft.EntityFrameworkCore.Query.Expressions.SelectExpression targetSelectExpression = null, System.Linq.Expressions.Expression topLevelPredicate = null, System.Boolean inProjection = False)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRawSqlCommandBuilder", + "MemberId": "Microsoft.EntityFrameworkCore.Storage.RawSqlCommand Build(System.String sql, System.Collections.Generic.IEnumerable parameters)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Boolean Close()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Boolean Open()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Guid get_ConnectionId()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task OpenAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitColumnReference(Microsoft.EntityFrameworkCore.Query.Expressions.ColumnReferenceExpression columnReferenceExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitCrossJoinLateral(Microsoft.EntityFrameworkCore.Query.Expressions.CrossJoinLateralExpression crossJoinLateralExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Query.Sql.ISqlExpressionVisitor", + "MemberId": "System.Linq.Expressions.Expression VisitSqlFragment(Microsoft.EntityFrameworkCore.Query.Expressions.SqlFragmentExpression sqlFragmentExpression)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Metadata.IRelationalIndexAnnotations", + "MemberId": "System.String get_Filter()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor get_ActiveCursor()", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Storage.RelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection", + "MemberId": "public System.Void set_ActiveCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Threading.SemaphoreSlim get_Semaphore()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Query.RelationalQueryContext : Microsoft.EntityFrameworkCore.Query.QueryContext", + "MemberId": "public virtual System.Void DeregisterValueBufferCursor(Microsoft.EntityFrameworkCore.Query.Internal.IValueBufferCursor valueBufferCursor)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.SemaphoreSlim get_Semaphore()", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Threading.Tasks.Task RegisterBufferableAsync(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable, System.Threading.CancellationToken cancellationToken)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalConnection : Microsoft.EntityFrameworkCore.Storage.IRelationalTransactionManager, System.IDisposable", + "MemberId": "System.Void RegisterBufferable(Microsoft.EntityFrameworkCore.Query.Internal.IBufferable bufferable)", + "Kind": "Addition" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapperExtensions", + "MemberId": "public static System.Boolean IsTypeMapped(this Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, System.Type clrType)", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions", + "MemberId": "public static System.Int32 ExecuteSqlCommand(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, System.String sql, params System.Object[] parameters)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_FloatingPointFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "protected abstract Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension Clone()", + "Kind": "Addition" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public abstract System.Boolean ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", + "Kind": "Addition" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String GenerateLiteralValue(System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DateTimeOffsetFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormat()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_DecimalFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.String get_FloatingPointFormatString()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Boolean value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Byte[] value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Char value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Data.DbType value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTime value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.DateTimeOffset value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Decimal value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Double value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Enum value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Guid value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int16 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int32 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Int64 value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Object value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.Single value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.String value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "protected virtual System.Void GenerateLiteralValue(System.Text.StringBuilder builder, System.TimeSpan value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalSqlGenerationHelper : Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "public System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.String GenerateLiteral(System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public interface Microsoft.EntityFrameworkCore.Storage.ISqlGenerationHelper", + "MemberId": "System.Void GenerateLiteral(System.Text.StringBuilder builder, System.Object value, Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping typeMapping = null)", + "Kind": "Removal" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "protected abstract Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension Clone()", + "Kind": "Addition" + }, + { + "TypeId": "public abstract class Microsoft.EntityFrameworkCore.Infrastructure.RelationalOptionsExtension : Microsoft.EntityFrameworkCore.Infrastructure.IDbContextOptionsExtension", + "MemberId": "public abstract System.Boolean ApplyServices(Microsoft.Extensions.DependencyInjection.IServiceCollection services)", + "Kind": "Addition" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Metadata.RelationalKeyAnnotations : Microsoft.EntityFrameworkCore.Metadata.IRelationalKeyAnnotations", + "MemberId": "public static System.String GetDefaultKeyName(System.String tableName, System.Boolean primaryKey, System.Collections.Generic.IEnumerable propertyNames)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", + "MemberId": "public .ctor(System.String storeType, System.Type clrType)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", + "MemberId": "public .ctor(System.String storeType, System.Type clrType, System.Nullable dbType)", + "Kind": "Removal" + } +] \ No newline at end of file diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index b44a8bfb4a4..a86358e2661 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -21,13 +21,11 @@ public void Throws_exceptions_for_invalid_context_name() private void ValidateContextNameInReverseEngineerGenerator(string contextName) { - var scaffoldingUtility = new ScaffoldingUtilities(); var reverseEngineer = new ReverseEngineeringGenerator( new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), - new ConfigurationFactory(CSharpUtilities.Instance, scaffoldingUtility), new StringBuilderCodeWriter( new InMemoryFileService(), - new DbContextWriter(scaffoldingUtility, CSharpUtilities.Instance), + new DbContextWriter(CSharpUtilities.Instance), new EntityTypeWriter(CSharpUtilities.Instance))); Assert.Equal( diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected index 80f106c38d8..55bbf8c8155 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected @@ -5,6 +5,11 @@ namespace E2ETest.Namespace { public partial class SelfReferencing { + public SelfReferencing() + { + InverseSelfReferenceFkNavigation = new HashSet(); + } + public int SelfReferencingId { get; set; } public string Name { get; set; } public string Description { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected index 21925e2f392..4e50d2656b9 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected @@ -303,8 +303,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToManyDependentId1, e.OneToManyDependentId2 }) - .HasName("PK_OneToManyDependent"); + entity.HasKey(e => new { e.OneToManyDependentId1, e.OneToManyDependentId2 }); entity.Property(e => e.OneToManyDependentId1).HasColumnName("OneToManyDependentID1"); @@ -326,8 +325,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToManyPrincipalId1, e.OneToManyPrincipalId2 }) - .HasName("PK_OneToManyPrincipal"); + entity.HasKey(e => new { e.OneToManyPrincipalId1, e.OneToManyPrincipalId2 }); entity.Property(e => e.OneToManyPrincipalId1).HasColumnName("OneToManyPrincipalID1"); @@ -340,8 +338,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneDependentId1, e.OneToOneDependentId2 }) - .HasName("PK_OneToOneDependent"); + entity.HasKey(e => new { e.OneToOneDependentId1, e.OneToOneDependentId2 }); entity.Property(e => e.OneToOneDependentId1).HasColumnName("OneToOneDependentID1"); @@ -360,8 +357,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneFktoUniqueKeyDependentId1, e.OneToOneFktoUniqueKeyDependentId2 }) - .HasName("PK_OneToOneFKToUniqueKeyDependent"); + entity.HasKey(e => new { e.OneToOneFktoUniqueKeyDependentId1, e.OneToOneFktoUniqueKeyDependentId2 }); entity.ToTable("OneToOneFKToUniqueKeyDependent"); @@ -390,8 +386,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneFktoUniqueKeyPrincipalId1, e.OneToOneFktoUniqueKeyPrincipalId2 }) - .HasName("PK_OneToOneFKToUniqueKeyPrincipal"); + entity.HasKey(e => new { e.OneToOneFktoUniqueKeyPrincipalId1, e.OneToOneFktoUniqueKeyPrincipalId2 }); entity.ToTable("OneToOneFKToUniqueKeyPrincipal"); @@ -414,8 +409,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOnePrincipalId1, e.OneToOnePrincipalId2 }) - .HasName("PK_OneToOnePrincipal"); + entity.HasKey(e => new { e.OneToOnePrincipalId1, e.OneToOnePrincipalId2 }); entity.Property(e => e.OneToOnePrincipalId1).HasColumnName("OneToOnePrincipalID1"); @@ -428,8 +422,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneSeparateFkdependentId1, e.OneToOneSeparateFkdependentId2 }) - .HasName("PK_OneToOneSeparateFKDependent"); + entity.HasKey(e => new { e.OneToOneSeparateFkdependentId1, e.OneToOneSeparateFkdependentId2 }); entity.ToTable("OneToOneSeparateFKDependent"); @@ -457,8 +450,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneSeparateFkprincipalId1, e.OneToOneSeparateFkprincipalId2 }) - .HasName("PK_OneToOneSeparateFKPrincipal"); + entity.HasKey(e => new { e.OneToOneSeparateFkprincipalId1, e.OneToOneSeparateFkprincipalId2 }); entity.ToTable("OneToOneSeparateFKPrincipal"); diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected index fc809e2f4c0..df5dc34bb06 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected @@ -68,10 +68,10 @@ namespace E2ETest.Namespace [Column("ntextColumn", TypeName = "ntext")] public string NtextColumn { get; set; } [Column("nvarcharColumn")] - [MaxLength(1)] + [StringLength(1)] public string NvarcharColumn { get; set; } [Column("nvarchar100Column")] - [MaxLength(100)] + [StringLength(100)] public string Nvarchar100Column { get; set; } [Column("nvarcharMaxColumn")] public string NvarcharMaxColumn { get; set; } @@ -126,18 +126,18 @@ namespace E2ETest.Namespace [Column("nationalCharacter171Column", TypeName = "nchar(171)")] public string NationalCharacter171Column { get; set; } [Column("nationalCharVaryingColumn")] - [MaxLength(1)] + [StringLength(1)] public string NationalCharVaryingColumn { get; set; } [Column("nationalCharVarying177Column")] - [MaxLength(177)] + [StringLength(177)] public string NationalCharVarying177Column { get; set; } [Column("nationalCharVaryingMaxColumn")] public string NationalCharVaryingMaxColumn { get; set; } [Column("nationalCharacterVaryingColumn")] - [MaxLength(1)] + [StringLength(1)] public string NationalCharacterVaryingColumn { get; set; } [Column("nationalCharacterVarying188Column")] - [MaxLength(188)] + [StringLength(188)] public string NationalCharacterVarying188Column { get; set; } [Column("nationalCharacterVaryingMaxColumn")] public string NationalCharacterVaryingMaxColumn { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected index 95c6b1240a8..268a089d187 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected @@ -43,6 +43,22 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { entity.Property(e => e.MultipleFksDependentId).ValueGeneratedNever(); + + entity.HasOne(d => d.RelationA) + .WithMany(p => p.MultipleFksDependentRelationA) + .HasForeignKey(d => d.RelationAid) + .OnDelete(DeleteBehavior.Restrict) + .HasConstraintName("FK_RelationA"); + + entity.HasOne(d => d.RelationB) + .WithMany(p => p.MultipleFksDependentRelationB) + .HasForeignKey(d => d.RelationBid) + .HasConstraintName("FK_RelationB"); + + entity.HasOne(d => d.RelationC) + .WithMany(p => p.MultipleFksDependentRelationC) + .HasForeignKey(d => d.RelationCid) + .HasConstraintName("FK_RelationC"); }); modelBuilder.Entity(entity => @@ -52,26 +68,33 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToManyDependentId1, e.OneToManyDependentId2 }) - .HasName("PK_OneToManyDependent"); + entity.HasKey(e => new { e.OneToManyDependentId1, e.OneToManyDependentId2 }); + + entity.HasOne(d => d.OneToManyDependentFk) + .WithMany(p => p.OneToManyDependent) + .HasForeignKey(d => new { d.OneToManyDependentFk1, d.OneToManyDependentFk2 }) + .HasConstraintName("FK_OneToManyDependent"); }); modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToManyPrincipalId1, e.OneToManyPrincipalId2 }) - .HasName("PK_OneToManyPrincipal"); + entity.HasKey(e => new { e.OneToManyPrincipalId1, e.OneToManyPrincipalId2 }); }); modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneDependentId1, e.OneToOneDependentId2 }) - .HasName("PK_OneToOneDependent"); + entity.HasKey(e => new { e.OneToOneDependentId1, e.OneToOneDependentId2 }); + + entity.HasOne(d => d.OneToOneDependentNavigation) + .WithOne(p => p.OneToOneDependent) + .HasForeignKey(d => new { d.OneToOneDependentId1, d.OneToOneDependentId2 }) + .OnDelete(DeleteBehavior.Restrict) + .HasConstraintName("FK_OneToOneDependent"); }); modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneFktoUniqueKeyDependentId1, e.OneToOneFktoUniqueKeyDependentId2 }) - .HasName("PK_OneToOneFKToUniqueKeyDependent"); + entity.HasKey(e => new { e.OneToOneFktoUniqueKeyDependentId1, e.OneToOneFktoUniqueKeyDependentId2 }); entity.HasIndex(e => new { e.OneToOneFktoUniqueKeyDependentFk1, e.OneToOneFktoUniqueKeyDependentFk2 }) .HasName("UK_OneToOneFKToUniqueKeyDependent") @@ -86,8 +109,7 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneFktoUniqueKeyPrincipalId1, e.OneToOneFktoUniqueKeyPrincipalId2 }) - .HasName("PK_OneToOneFKToUniqueKeyPrincipal"); + entity.HasKey(e => new { e.OneToOneFktoUniqueKeyPrincipalId1, e.OneToOneFktoUniqueKeyPrincipalId2 }); entity.HasIndex(e => new { e.OneToOneFktoUniqueKeyPrincipalUniqueKey1, e.OneToOneFktoUniqueKeyPrincipalUniqueKey2 }) .HasName("UK_OneToOneFKToUniqueKeyPrincipal") @@ -96,24 +118,26 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOnePrincipalId1, e.OneToOnePrincipalId2 }) - .HasName("PK_OneToOnePrincipal"); + entity.HasKey(e => new { e.OneToOnePrincipalId1, e.OneToOnePrincipalId2 }); }); modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneSeparateFkdependentId1, e.OneToOneSeparateFkdependentId2 }) - .HasName("PK_OneToOneSeparateFKDependent"); + entity.HasKey(e => new { e.OneToOneSeparateFkdependentId1, e.OneToOneSeparateFkdependentId2 }); entity.HasIndex(e => new { e.OneToOneSeparateFkdependentFk1, e.OneToOneSeparateFkdependentFk2 }) .HasName("UK_OneToOneSeparateFKDependent") .IsUnique(); + + entity.HasOne(d => d.OneToOneSeparateFkdependentFk) + .WithOne(p => p.OneToOneSeparateFkdependent) + .HasForeignKey(d => new { d.OneToOneSeparateFkdependentFk1, d.OneToOneSeparateFkdependentFk2 }) + .HasConstraintName("FK_OneToOneSeparateFKDependent"); }); modelBuilder.Entity(entity => { - entity.HasKey(e => new { e.OneToOneSeparateFkprincipalId1, e.OneToOneSeparateFkprincipalId2 }) - .HasName("PK_OneToOneSeparateFKPrincipal"); + entity.HasKey(e => new { e.OneToOneSeparateFkprincipalId1, e.OneToOneSeparateFkprincipalId2 }); }); modelBuilder.Entity(entity => @@ -143,6 +167,11 @@ namespace E2ETest.Namespace modelBuilder.Entity(entity => { entity.Property(e => e.SelfReferencingId).ValueGeneratedNever(); + + entity.HasOne(d => d.SelfReferenceFkNavigation) + .WithMany(p => p.InverseSelfReferenceFkNavigation) + .HasForeignKey(d => d.SelfReferenceFk) + .HasConstraintName("FK_SelfReferencing"); }); modelBuilder.Entity(entity => diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected index d584d92dae8..a1f5bff1d47 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected @@ -11,7 +11,7 @@ namespace E2ETest.Namespace [Column("MultipleFKsDependentId")] public int MultipleFksDependentId { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string AnotherColumn { get; set; } [Column("RelationAId")] public int RelationAid { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected index 34cca4488b2..b0caabf42fa 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected @@ -18,7 +18,7 @@ namespace E2ETest.Namespace [Column("MultipleFKsPrincipalId")] public int MultipleFksPrincipalId { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomePrincipalColumn { get; set; } [InverseProperty("RelationA")] diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected index 3c75c76222a..6f8e22f1e66 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected @@ -12,7 +12,7 @@ namespace E2ETest.Namespace [Column("OneToManyDependentID2")] public int OneToManyDependentId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomeDependentEndColumn { get; set; } [Column("OneToManyDependentFK2")] public int? OneToManyDependentFk2 { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected index d7e3d10b093..44208ed844c 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected @@ -17,7 +17,7 @@ namespace E2ETest.Namespace [Column("OneToManyPrincipalID2")] public int OneToManyPrincipalId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string Other { get; set; } [InverseProperty("OneToManyDependentFk")] diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected index aa12ebdec45..32592e640de 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected @@ -12,7 +12,7 @@ namespace E2ETest.Namespace [Column("OneToOneDependentID2")] public int OneToOneDependentId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomeDependentEndColumn { get; set; } [ForeignKey("OneToOneDependentId1,OneToOneDependentId2")] diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected index ef63217ceac..1eae458c1a8 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected @@ -13,7 +13,7 @@ namespace E2ETest.Namespace [Column("OneToOneFKToUniqueKeyDependentID2")] public int OneToOneFktoUniqueKeyDependentId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomeColumn { get; set; } [Column("OneToOneFKToUniqueKeyDependentFK1")] public int? OneToOneFktoUniqueKeyDependentFk1 { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected index 72c57022393..f8d49dd8626 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected @@ -13,7 +13,7 @@ namespace E2ETest.Namespace [Column("OneToOneFKToUniqueKeyPrincipalID2")] public int OneToOneFktoUniqueKeyPrincipalId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomePrincipalColumn { get; set; } [Column("OneToOneFKToUniqueKeyPrincipalUniqueKey1")] public int OneToOneFktoUniqueKeyPrincipalUniqueKey1 { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected index 7ae4b7f199e..bdaaec23edd 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected @@ -12,7 +12,7 @@ namespace E2ETest.Namespace [Column("OneToOnePrincipalID2")] public int OneToOnePrincipalId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomeOneToOnePrincipalColumn { get; set; } [InverseProperty("OneToOneDependentNavigation")] diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected index c768ed48be7..73c20435556 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected @@ -13,7 +13,7 @@ namespace E2ETest.Namespace [Column("OneToOneSeparateFKDependentID2")] public int OneToOneSeparateFkdependentId2 { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string SomeDependentEndColumn { get; set; } [Column("OneToOneSeparateFKDependentFK1")] public int? OneToOneSeparateFkdependentFk1 { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected index fccfd2e2f7a..82f7987c772 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected @@ -14,7 +14,7 @@ namespace E2ETest.Namespace public int OneToOneSeparateFkprincipalId2 { get; set; } [Required] [Column("SomeOneToOneSeparateFKPrincipalColumn")] - [MaxLength(20)] + [StringLength(20)] public string SomeOneToOneSeparateFkprincipalColumn { get; set; } [InverseProperty("OneToOneSeparateFkdependentFk")] diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected index 3b760e0e72b..13375e87c47 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected @@ -7,13 +7,18 @@ namespace E2ETest.Namespace { public partial class SelfReferencing { + public SelfReferencing() + { + InverseSelfReferenceFkNavigation = new HashSet(); + } + [Column("SelfReferencingID")] public int SelfReferencingId { get; set; } [Required] - [MaxLength(20)] + [StringLength(20)] public string Name { get; set; } [Required] - [MaxLength(100)] + [StringLength(100)] public string Description { get; set; } [Column("SelfReferenceFK")] public int? SelfReferenceFk { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected index 6ac594873fc..f104f778874 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected @@ -12,7 +12,7 @@ namespace E2ETest.Namespace public int UnmappablePkcolumnId { get; set; } [Required] [Column("AColumn")] - [MaxLength(20)] + [StringLength(20)] public string Acolumn { get; set; } public int ValueGeneratedOnAddColumn { get; set; } } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected index 55b5f86b818..9f0d8f74b29 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected @@ -23,7 +23,7 @@ namespace E2ETest.Namespace { entity.HasIndex(e => e.Number) .HasName("Unicorn_Filtered_Index") - .HasFilter(@"([Number]>(10))"); + .HasFilter("([Number]>(10))"); entity.Property(e => e.Id).ValueGeneratedNever(); }); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected index bd08a0aab89..f00a6c0258b 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected @@ -5,6 +5,11 @@ namespace E2E.Sqlite { public partial class SelfRef { + public SelfRef() + { + InverseSelfForeignKeyNavigation = new HashSet(); + } + public long Id { get; set; } public long? SelfForeignKey { get; set; } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected index 2db1463c90d..ad8213e7ad5 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected @@ -20,7 +20,6 @@ namespace E2E.Sqlite } protected override void OnModelCreating(ModelBuilder modelBuilder) - { - } + {} } } \ No newline at end of file diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected index 66f3c3097b2..6b598540040 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected @@ -25,6 +25,11 @@ namespace E2E.Sqlite entity.HasIndex(e => e.PrincipalId) .HasName("sqlite_autoindex_Dependent_1") .IsUnique(); + + entity.HasOne(d => d.Principal) + .WithOne(p => p.Dependent) + .HasForeignKey(d => d.PrincipalId) + .OnDelete(DeleteBehavior.Restrict); }); } } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected index 512e6474335..915876a43a9 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected @@ -7,6 +7,11 @@ namespace E2E.Sqlite { public partial class SelfRef { + public SelfRef() + { + InverseSelfForeignKeyNavigation = new HashSet(); + } + public long Id { get; set; } public long? SelfForeignKey { get; set; } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected index 6d9795f9bff..ba2bb77541f 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected @@ -18,7 +18,6 @@ namespace E2E.Sqlite } protected override void OnModelCreating(ModelBuilder modelBuilder) - { - } + {} } } \ No newline at end of file From d1270e972a04301f957e060c24a648c03ee4372d Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 25 May 2017 12:14:47 -0700 Subject: [PATCH 05/11] RevEng: Rename classes to more appropriate names --- .../Design/Internal/DatabaseOperations.cs | 2 +- ...tWriter.cs => CSharpDbContextGenerator.cs} | 6 ++-- ...Writer.cs => CSharpEntityTypeGenerator.cs} | 4 +-- ...riter.cs => CSharpScaffoldingGenerator.cs} | 26 ++++++++------- ...ingGenerator.cs => DbContextScaffolder.cs} | 32 ++++++++++--------- ...eWriter.cs => ScaffoldingCodeGenerator.cs} | 8 ++--- .../ScaffoldingServiceCollectionExtensions.cs | 8 ++--- .../ReverseEngineering/E2ETestBase.cs | 4 +-- .../Internal/CSharpNamer.cs | 4 ++- .../ReverseEngineeringConfigurationTests.cs | 9 +++--- 10 files changed, 54 insertions(+), 49 deletions(-) rename src/EFCore.Design/Scaffolding/Internal/{DbContextWriter.cs => CSharpDbContextGenerator.cs} (99%) rename src/EFCore.Design/Scaffolding/Internal/{EntityTypeWriter.cs => CSharpEntityTypeGenerator.cs} (99%) rename src/EFCore.Design/Scaffolding/Internal/{StringBuilderCodeWriter.cs => CSharpScaffoldingGenerator.cs} (76%) rename src/EFCore.Design/Scaffolding/Internal/{ReverseEngineeringGenerator.cs => DbContextScaffolder.cs} (82%) rename src/EFCore.Design/Scaffolding/Internal/{CodeWriter.cs => ScaffoldingCodeGenerator.cs} (94%) diff --git a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs index 9257858ee61..3110d4a26c6 100644 --- a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs +++ b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs @@ -62,7 +62,7 @@ public virtual Task ScaffoldContextAsync( loggerFactory.AddProvider(new LoggerProvider(categoryName => new OperationLogger(categoryName, _reporter))); #pragma warning restore CS0618 // Type or member is obsolete - var generator = services.GetRequiredService(); + var generator = services.GetRequiredService(); return generator.GenerateAsync( connectionString, diff --git a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs similarity index 99% rename from src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs index 88d82af2f8a..d2acbb6adec 100644 --- a/src/EFCore.Design/Scaffolding/Internal/DbContextWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs @@ -18,7 +18,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class DbContextWriter + public class CSharpDbContextGenerator { private const string EntityLambdaIdentifier = "entity"; @@ -30,7 +30,7 @@ public class DbContextWriter /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public DbContextWriter( + public CSharpDbContextGenerator( [NotNull] CSharpUtilities cSharpUtilities) { Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); @@ -312,7 +312,7 @@ private void GenerateIndex(IIndex index) if (!string.IsNullOrEmpty(index.Relational().Name)) { - lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({CSharpUtilities.Instance.DelimitString(index.Relational().Name)})"); + lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({CSharpUtilities.DelimitString(index.Relational().Name)})"); } if (index.IsUnique) diff --git a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs similarity index 99% rename from src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs index 1009f2714a0..dab5f02ceb2 100644 --- a/src/EFCore.Design/Scaffolding/Internal/EntityTypeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpEntityTypeGenerator.cs @@ -19,7 +19,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class EntityTypeWriter + public class CSharpEntityTypeGenerator { private CSharpUtilities CSharpUtilities { get; } @@ -30,7 +30,7 @@ public class EntityTypeWriter /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public EntityTypeWriter( + public CSharpEntityTypeGenerator( [NotNull] CSharpUtilities cSharpUtilities) { Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); diff --git a/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpScaffoldingGenerator.cs similarity index 76% rename from src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpScaffoldingGenerator.cs index 92451ad292a..af35c946461 100644 --- a/src/EFCore.Design/Scaffolding/Internal/StringBuilderCodeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpScaffoldingGenerator.cs @@ -14,37 +14,39 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class StringBuilderCodeWriter : CodeWriter + public class CSharpScaffoldingGenerator : ScaffoldingCodeGenerator { /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual DbContextWriter DbContextWriter { get; } + public virtual CSharpDbContextGenerator CSharpDbContextGenerator { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual EntityTypeWriter EntityTypeWriter { get; } + public virtual CSharpEntityTypeGenerator CSharpEntityTypeGenerator { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public StringBuilderCodeWriter( + public CSharpScaffoldingGenerator( [NotNull] IFileService fileService, - [NotNull] DbContextWriter dbContextWriter, - [NotNull] EntityTypeWriter entityTypeWriter) + [NotNull] CSharpDbContextGenerator cSharpDbContextGenerator, + [NotNull] CSharpEntityTypeGenerator cSharpEntityTypeGenerator) : base(fileService) { - Check.NotNull(dbContextWriter, nameof(dbContextWriter)); - Check.NotNull(entityTypeWriter, nameof(entityTypeWriter)); + Check.NotNull(cSharpDbContextGenerator, nameof(cSharpDbContextGenerator)); + Check.NotNull(cSharpEntityTypeGenerator, nameof(cSharpEntityTypeGenerator)); - DbContextWriter = dbContextWriter; - EntityTypeWriter = entityTypeWriter; + CSharpDbContextGenerator = cSharpDbContextGenerator; + CSharpEntityTypeGenerator = cSharpEntityTypeGenerator; } + public override string FileExtension => ".cs"; + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. @@ -68,7 +70,7 @@ public override Task WriteCodeAsync( var resultingFiles = new ReverseEngineerFiles(); - var generatedCode = DbContextWriter.WriteCode(model, @namespace, contextName, connectionString, useDataAnnotations); + var generatedCode = CSharpDbContextGenerator.WriteCode(model, @namespace, contextName, connectionString, useDataAnnotations); // output DbContext .cs file var dbContextFileName = contextName + FileExtension; @@ -78,7 +80,7 @@ public override Task WriteCodeAsync( foreach (var entityType in model.GetEntityTypes()) { - generatedCode = EntityTypeWriter.WriteCode(entityType, @namespace, useDataAnnotations); + generatedCode = CSharpEntityTypeGenerator.WriteCode(entityType, @namespace, useDataAnnotations); // output EntityType poco .cs file var entityTypeFileName = entityType.DisplayName() + FileExtension; diff --git a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs similarity index 82% rename from src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs rename to src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs index bf060f5701c..b2560f5b84f 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ReverseEngineeringGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs @@ -18,34 +18,36 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class ReverseEngineeringGenerator + public class DbContextScaffolder { private readonly IScaffoldingModelFactory _factory; + private readonly CSharpUtilities _cSharpUtilities; private static readonly char[] _directorySeparatorChars = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar }; private const string DbContextSuffix = "Context"; private const string DefaultDbContextName = "Model" + DbContextSuffix; - - + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public ReverseEngineeringGenerator( + public DbContextScaffolder( [NotNull] IScaffoldingModelFactory scaffoldingModelFactory, - [NotNull] CodeWriter codeWriter) + [NotNull] ScaffoldingCodeGenerator scaffoldingCodeGenerator, + [NotNull] CSharpUtilities cSharpUtilities) { Check.NotNull(scaffoldingModelFactory, nameof(scaffoldingModelFactory)); - Check.NotNull(codeWriter, nameof(codeWriter)); + Check.NotNull(scaffoldingCodeGenerator, nameof(scaffoldingCodeGenerator)); _factory = scaffoldingModelFactory; - CodeWriter = codeWriter; + ScaffoldingCodeGenerator = scaffoldingCodeGenerator; + _cSharpUtilities = cSharpUtilities; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual CodeWriter CodeWriter { get; } + private ScaffoldingCodeGenerator ScaffoldingCodeGenerator { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -70,8 +72,8 @@ public virtual Task GenerateAsync( cancellationToken.ThrowIfCancellationRequested(); if (!string.IsNullOrWhiteSpace(contextName) - && (!CSharpUtilities.Instance.IsValidIdentifier(contextName) - || CSharpUtilities.Instance.IsCSharpKeyword(contextName))) + && (!_cSharpUtilities.IsValidIdentifier(contextName) + || _cSharpUtilities.IsCSharpKeyword(contextName))) { throw new ArgumentException( DesignStrings.ContextClassNotValidCSharpIdentifier(contextName)); @@ -101,7 +103,7 @@ public virtual Task GenerateAsync( @namespace += "." + string.Join( ".", relativeOutputPath .Split(_directorySeparatorChars, StringSplitOptions.RemoveEmptyEntries) - .Select(p => CSharpUtilities.Instance.GenerateCSharpIdentifier(p, existingIdentifiers: null))); + .Select(p => _cSharpUtilities.GenerateCSharpIdentifier(p, existingIdentifiers: null))); } if (string.IsNullOrEmpty(contextName)) @@ -111,13 +113,13 @@ public virtual Task GenerateAsync( var annotatedName = model.Scaffolding().DatabaseName; if (!string.IsNullOrEmpty(annotatedName)) { - contextName = CSharpUtilities.Instance.GenerateCSharpIdentifier(annotatedName + DbContextSuffix, existingIdentifiers: null); + contextName = _cSharpUtilities.GenerateCSharpIdentifier(annotatedName + DbContextSuffix, existingIdentifiers: null); } } CheckOutputFiles(fullOutputPath, contextName, model, overwriteFiles); - return CodeWriter.WriteCodeAsync(model, fullOutputPath, @namespace, contextName, connectionString, useDataAnnotations, cancellationToken); + return ScaffoldingCodeGenerator.WriteCodeAsync(model, fullOutputPath, @namespace, contextName, connectionString, useDataAnnotations, cancellationToken); } private void CheckOutputFiles( @@ -130,7 +132,7 @@ private void CheckOutputFiles( Check.NotEmpty(dbContextClassName, nameof(dbContextClassName)); Check.NotNull(metadataModel, nameof(metadataModel)); - var readOnlyFiles = CodeWriter.GetReadOnlyFilePaths( + var readOnlyFiles = ScaffoldingCodeGenerator.GetReadOnlyFilePaths( outputPath, dbContextClassName, metadataModel.GetEntityTypes()); if (readOnlyFiles.Count > 0) @@ -144,7 +146,7 @@ private void CheckOutputFiles( if (!overwriteFiles) { - var existingFiles = CodeWriter.GetExistingFilePaths( + var existingFiles = ScaffoldingCodeGenerator.GetExistingFilePaths( outputPath, dbContextClassName, metadataModel.GetEntityTypes()); if (existingFiles.Count > 0) { diff --git a/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingCodeGenerator.cs similarity index 94% rename from src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs rename to src/EFCore.Design/Scaffolding/Internal/ScaffoldingCodeGenerator.cs index a1b1b07b169..2add1e9d736 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CodeWriter.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingCodeGenerator.cs @@ -16,15 +16,13 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public abstract class CodeWriter + public abstract class ScaffoldingCodeGenerator { - private const string DefaultFileExtension = ".cs"; - /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - protected CodeWriter([NotNull] IFileService fileService) + protected ScaffoldingCodeGenerator([NotNull] IFileService fileService) { Check.NotNull(fileService, nameof(fileService)); @@ -41,7 +39,7 @@ protected CodeWriter([NotNull] IFileService fileService) /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public virtual string FileExtension { get; [param: NotNull] set; } = DefaultFileExtension; + public abstract string FileExtension { get; } /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used diff --git a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs index dde14ed62c6..4f28abe8b8a 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs @@ -24,13 +24,13 @@ public static class ScaffoldingServiceCollectionExtensions public static IServiceCollection AddScaffolding([NotNull] this IServiceCollection serviceCollection) => serviceCollection.AddSingleton() .AddSingleton() - .AddSingleton() + .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton() - .AddSingleton() - .AddSingleton() + .AddSingleton() + .AddSingleton() + .AddSingleton() .AddSingleton() .AddSingleton(new DiagnosticListener(DbLoggerCategory.Name)) .AddSingleton(typeof(IDiagnosticsLogger<>), typeof(DiagnosticsLogger<>)) diff --git a/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs b/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs index 38e80ebbce3..ae4c6133199 100644 --- a/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs +++ b/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs @@ -21,7 +21,7 @@ public abstract class E2ETestBase private readonly ITestOutputHelper _output; protected InMemoryOperationReporter _reporter; protected InMemoryFileService InMemoryFiles; - protected readonly ReverseEngineeringGenerator Generator; + protected readonly DbContextScaffolder Generator; protected readonly IScaffoldingModelFactory ScaffoldingModelFactory; protected E2ETestBase(ITestOutputHelper output) @@ -44,7 +44,7 @@ protected E2ETestBase(ITestOutputHelper output) factory.AddProvider(new LoggerProvider(categoryName => new OperationLogger(categoryName, _reporter))); #pragma warning restore CS0618 // Type or member is obsolete - Generator = serviceProvider.GetRequiredService(); + Generator = serviceProvider.GetRequiredService(); ScaffoldingModelFactory = serviceProvider.GetRequiredService(); } diff --git a/src/EFCore.Relational.Design/Internal/CSharpNamer.cs b/src/EFCore.Relational.Design/Internal/CSharpNamer.cs index d4d3cdf44fb..70ed6618e29 100644 --- a/src/EFCore.Relational.Design/Internal/CSharpNamer.cs +++ b/src/EFCore.Relational.Design/Internal/CSharpNamer.cs @@ -15,6 +15,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal public class CSharpNamer { private readonly Func _nameGetter; + private readonly CSharpUtilities _cSharpUtilities; /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -31,6 +32,7 @@ public CSharpNamer([NotNull] Func nameGetter) Check.NotNull(nameGetter, nameof(nameGetter)); _nameGetter = nameGetter; + _cSharpUtilities = new CSharpUtilities(); } /// @@ -46,7 +48,7 @@ public virtual string GetName([NotNull] T item) return NameCache[item]; } - var name = CSharpUtilities.Instance.GenerateCSharpIdentifier(_nameGetter(item), null); + var name = _cSharpUtilities.GenerateCSharpIdentifier(_nameGetter(item), null); NameCache.Add(item, name); return name; } diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index a86358e2661..3b438c53f5f 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -21,12 +21,13 @@ public void Throws_exceptions_for_invalid_context_name() private void ValidateContextNameInReverseEngineerGenerator(string contextName) { - var reverseEngineer = new ReverseEngineeringGenerator( + var reverseEngineer = new DbContextScaffolder( new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), - new StringBuilderCodeWriter( + new CSharpScaffoldingGenerator( new InMemoryFileService(), - new DbContextWriter(CSharpUtilities.Instance), - new EntityTypeWriter(CSharpUtilities.Instance))); + new CSharpDbContextGenerator(CSharpUtilities.Instance), + new CSharpEntityTypeGenerator(CSharpUtilities.Instance)), + CSharpUtilities.Instance); Assert.Equal( DesignStrings.ContextClassNotValidCSharpIdentifier(contextName), From 73e10420f58bbaa65bc6b7321e98b791b56387ba Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 25 May 2017 14:17:40 -0700 Subject: [PATCH 06/11] Remove Sqlite.Design package Remove Sqlite.Design.Tests Introduce IScaffoldingHelper interface which provider overwrites to generate provider specific code in scaffolding pipeline --- EFCore.sln | 16 +- .../Internal/CSharpDbContextGenerator.cs | 53 +- .../ScaffoldingServiceCollectionExtensions.cs | 1 + .../Internal/ScaffoldingAnnotationNames.cs | 6 - .../Metadata/ScaffoldingModelAnnotations.cs | 12 - .../RelationalDesignStrings.Designer.cs | 6 - .../Properties/RelationalDesignStrings.resx | 3 - .../breakingchanges.netcore.json | 10 + .../Scaffolding/IScaffoldingHelper.cs | 12 + .../Internal/SqlServerDesignTimeServices.cs | 3 +- .../SqlServerScaffoldingModelFactory.cs | 11 - src/EFCore.SqlServer/EFCore.SqlServer.csproj | 1 + .../Internal/SqlServerScaffoldingHelper.cs | 13 + .../Internal/SqliteDesignTimeServices.cs | 9 +- .../Diagnostics/SqliteEventId.cs | 28 +- .../EFCore.Sqlite.Core.csproj | 1 + .../Internal/SqliteLoggerExtensions.cs} | 83 ++- .../Properties/AssemblyInfo.cs | 6 +- .../Properties/SqliteStrings.Designer.cs | 30 ++ .../Properties/SqliteStrings.resx | 12 + .../Internal/SqliteDatabaseModelFactory.cs | 14 +- .../Internal/SqliteScaffoldingHelper.cs | 13 + .../SqliteTableSelectionSetExtensions.cs | 13 +- .../Internal/SqliteLoggerExtensions.cs | 81 --- .../Diagnostics/SqliteDesignEventId.cs | 53 -- .../EFCore.Sqlite.Design.csproj | 52 -- .../Internal/SqliteScaffoldingModelFactory.cs | 56 -- .../Properties/InternalsVisibleTo.cs | 6 - .../SqliteDesignStrings.Designer.cs | 62 --- .../SqliteDesignStrings.Designer.tt | 4 - .../Properties/SqliteDesignStrings.resx | 132 ----- .../baseline.netcore.json | 490 ------------------ .../breakingchanges.netcore.json | 6 - .../ReverseEngineeringConfigurationTests.cs | 10 +- .../ScaffoldingMetadataExtenstionsTest.cs | 14 - .../Design}/DesignTimeProviderServicesTest.cs | 3 +- ...SqlServerDesignTimeProviderServicesTest.cs | 1 + ...FCore.Sqlite.Design.FunctionalTests.csproj | 1 - .../ReverseEngineering/SqliteE2ETestBase.cs | 1 + .../SqliteDatabaseModelFactoryTest.cs | 1 + .../SqliteScaffoldingModelFactoryTest.cs | 1 + .../ApiConsistencyTest.cs | 13 - .../EFCore.Sqlite.Design.Tests.csproj | 36 -- .../SqliteDesignEventIdTest.cs | 29 -- .../EFCore.Sqlite.FunctionalTests.csproj | 1 - .../ScaffoldingTypeMapperSqliteTest.cs | 2 +- .../SqliteDesignTimeProviderServicesTest.cs | 4 +- .../SqliteTableSelectionSetExtensionsTests.cs | 2 +- 48 files changed, 270 insertions(+), 1147 deletions(-) create mode 100644 src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs create mode 100644 src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs rename src/{EFCore.Sqlite.Design => EFCore.Sqlite.Core/Design}/Internal/SqliteDesignTimeServices.cs (81%) rename src/{EFCore.Sqlite.Design/Internal/SqliteDesignLoggerExtensions.cs => EFCore.Sqlite.Core/Internal/SqliteLoggerExtensions.cs} (60%) rename src/{EFCore.Sqlite.Design => EFCore.Sqlite.Core/Scaffolding}/Internal/SqliteDatabaseModelFactory.cs (96%) create mode 100644 src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs rename src/{EFCore.Sqlite.Design => EFCore.Sqlite.Core/Scaffolding}/Internal/SqliteTableSelectionSetExtensions.cs (78%) delete mode 100644 src/EFCore.Sqlite.Core/Storage/Internal/SqliteLoggerExtensions.cs delete mode 100644 src/EFCore.Sqlite.Design/Diagnostics/SqliteDesignEventId.cs delete mode 100644 src/EFCore.Sqlite.Design/EFCore.Sqlite.Design.csproj delete mode 100644 src/EFCore.Sqlite.Design/Internal/SqliteScaffoldingModelFactory.cs delete mode 100644 src/EFCore.Sqlite.Design/Properties/InternalsVisibleTo.cs delete mode 100644 src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.cs delete mode 100644 src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.tt delete mode 100644 src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.resx delete mode 100644 src/EFCore.Sqlite.Design/baseline.netcore.json delete mode 100644 src/EFCore.Sqlite.Design/breakingchanges.netcore.json rename {src/EFCore.Relational.Design.Specification.Tests => test/EFCore.Relational.Tests/Design}/DesignTimeProviderServicesTest.cs (91%) delete mode 100644 test/EFCore.Sqlite.Design.Tests/ApiConsistencyTest.cs delete mode 100644 test/EFCore.Sqlite.Design.Tests/EFCore.Sqlite.Design.Tests.csproj delete mode 100644 test/EFCore.Sqlite.Design.Tests/SqliteDesignEventIdTest.cs rename test/{EFCore.Sqlite.Design.Tests => EFCore.Sqlite.Tests/Design}/ScaffoldingTypeMapperSqliteTest.cs (99%) rename test/{EFCore.Sqlite.Design.Tests => EFCore.Sqlite.Tests/Design}/SqliteDesignTimeProviderServicesTest.cs (85%) rename test/{EFCore.Sqlite.Design.Tests => EFCore.Sqlite.Tests/Design}/SqliteTableSelectionSetExtensionsTests.cs (97%) diff --git a/EFCore.sln b/EFCore.sln index eaf967f998f..08aa2ab2838 100644 --- a/EFCore.sln +++ b/EFCore.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +VisualStudioVersion = 15.0.26228.9 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore", "src\EFCore\EFCore.csproj", "{715C38E9-B2F5-4DB2-8025-0C6492DEBDD4}" EndProject @@ -19,8 +19,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Design", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Design", "src\EFCore.Relational.Design\EFCore.Relational.Design.csproj", "{1942C281-C12B-4818-8CC8-C42842871FF5}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Design", "src\EFCore.Sqlite.Design\EFCore.Sqlite.Design.csproj", "{D94396A3-391F-4015-9B61-89A9E08D6618}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer", "src\EFCore.SqlServer\EFCore.SqlServer.csproj", "{99595B81-D47C-40BA-8C61-5328A5A0E4AB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.CrossStore.FunctionalTests", "test\EFCore.CrossStore.FunctionalTests\EFCore.CrossStore.FunctionalTests.csproj", "{7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0}" @@ -35,8 +33,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Tests", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Design.FunctionalTests", "test\EFCore.Sqlite.Design.FunctionalTests\EFCore.Sqlite.Design.FunctionalTests.csproj", "{2A62F6C9-B7F3-443B-A253-931D38879A9C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Design.Tests", "test\EFCore.Sqlite.Design.Tests\EFCore.Sqlite.Design.Tests.csproj", "{DE5338E6-BD0D-45A1-9C53-FD05CFCE578E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.FunctionalTests", "test\EFCore.Sqlite.FunctionalTests\EFCore.Sqlite.FunctionalTests.csproj", "{7BB7D051-56D7-4A40-A29E-3801F5C19239}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Tests", "test\EFCore.Sqlite.Tests\EFCore.Sqlite.Tests.csproj", "{7E436D99-82A6-496C-A725-0819CBED056D}" @@ -115,10 +111,6 @@ Global {1942C281-C12B-4818-8CC8-C42842871FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU {1942C281-C12B-4818-8CC8-C42842871FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU {1942C281-C12B-4818-8CC8-C42842871FF5}.Release|Any CPU.Build.0 = Release|Any CPU - {D94396A3-391F-4015-9B61-89A9E08D6618}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D94396A3-391F-4015-9B61-89A9E08D6618}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D94396A3-391F-4015-9B61-89A9E08D6618}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D94396A3-391F-4015-9B61-89A9E08D6618}.Release|Any CPU.Build.0 = Release|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -147,10 +139,6 @@ Global {2A62F6C9-B7F3-443B-A253-931D38879A9C}.Debug|Any CPU.Build.0 = Debug|Any CPU {2A62F6C9-B7F3-443B-A253-931D38879A9C}.Release|Any CPU.ActiveCfg = Release|Any CPU {2A62F6C9-B7F3-443B-A253-931D38879A9C}.Release|Any CPU.Build.0 = Release|Any CPU - {DE5338E6-BD0D-45A1-9C53-FD05CFCE578E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE5338E6-BD0D-45A1-9C53-FD05CFCE578E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE5338E6-BD0D-45A1-9C53-FD05CFCE578E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE5338E6-BD0D-45A1-9C53-FD05CFCE578E}.Release|Any CPU.Build.0 = Release|Any CPU {7BB7D051-56D7-4A40-A29E-3801F5C19239}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7BB7D051-56D7-4A40-A29E-3801F5C19239}.Debug|Any CPU.Build.0 = Debug|Any CPU {7BB7D051-56D7-4A40-A29E-3801F5C19239}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -258,7 +246,6 @@ Global {A257C01B-BB91-44BA-831C-1E04F7800AC8} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {1942C281-C12B-4818-8CC8-C42842871FF5} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} - {D94396A3-391F-4015-9B61-89A9E08D6618} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {99595B81-D47C-40BA-8C61-5328A5A0E4AB} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0} = {258D5057-81B9-40EC-A872-D21E27452749} {305B30D3-0E30-46E9-BA9D-060E0B79BE98} = {258D5057-81B9-40EC-A872-D21E27452749} @@ -266,7 +253,6 @@ Global {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C} = {258D5057-81B9-40EC-A872-D21E27452749} {1A884122-DC9E-42B1-8821-E43340F954D1} = {258D5057-81B9-40EC-A872-D21E27452749} {2A62F6C9-B7F3-443B-A253-931D38879A9C} = {258D5057-81B9-40EC-A872-D21E27452749} - {DE5338E6-BD0D-45A1-9C53-FD05CFCE578E} = {258D5057-81B9-40EC-A872-D21E27452749} {7BB7D051-56D7-4A40-A29E-3801F5C19239} = {258D5057-81B9-40EC-A872-D21E27452749} {7E436D99-82A6-496C-A725-0819CBED056D} = {258D5057-81B9-40EC-A872-D21E27452749} {15033D6B-D415-4932-9462-F2A5AE0B75E8} = {258D5057-81B9-40EC-A872-D21E27452749} diff --git a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs index d2acbb6adec..da948cf42a3 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs @@ -22,7 +22,8 @@ public class CSharpDbContextGenerator { private const string EntityLambdaIdentifier = "entity"; - private CSharpUtilities CSharpUtilities { get; } + private readonly CSharpUtilities _cSharpUtilities; + private readonly IScaffoldingHelper _scaffoldingHelper; private IndentedStringBuilder _sb; private bool _entityTypeBuilderInitialized; @@ -31,11 +32,14 @@ public class CSharpDbContextGenerator /// directly from your code. This API may change or be removed in future releases. /// public CSharpDbContextGenerator( + [NotNull] IScaffoldingHelper scaffoldingHelper, [NotNull] CSharpUtilities cSharpUtilities) { + Check.NotNull(scaffoldingHelper, nameof(scaffoldingHelper)); Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); - CSharpUtilities = cSharpUtilities; + _scaffoldingHelper = scaffoldingHelper; + _cSharpUtilities = cSharpUtilities; } /// @@ -80,7 +84,7 @@ private void GenerateClass(IModel model, string contextName, string connectionSt { GenerateDbSets(model); GenerateEntityTypeErrors(model); - GenerateOnConfiguring(model, connectionString); + GenerateOnConfiguring(connectionString); GenerateOnModelCreating(model, useDataAnnotations); } @@ -113,7 +117,7 @@ private void GenerateEntityTypeErrors(IModel model) } } - private void GenerateOnConfiguring(IModel model, string connectionString) + private void GenerateOnConfiguring(string connectionString) { _sb.AppendLine("protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)"); _sb.AppendLine("{"); @@ -127,14 +131,7 @@ private void GenerateOnConfiguring(IModel model, string connectionString) { _sb.AppendLine("#warning " + DesignStrings.SensitiveInformationWarning); - var methodName = model.Scaffolding().UseProviderMethodName; - - if (string.IsNullOrEmpty(methodName)) - { - throw new InvalidOperationException(RelationalDesignStrings.MissingUseProviderMethodNameAnnotation); - } - - _sb.AppendLine($"optionsBuilder.{methodName}({CSharpUtilities.GenerateVerbatimStringLiteral(connectionString)});"); + _sb.AppendLine($"optionsBuilder.{_scaffoldingHelper.GetProviderOptionsBuilder(connectionString)}"); } _sb.AppendLine("}"); @@ -271,7 +268,7 @@ private void GenerateKey(IKey key, bool useDataAnnotations) if (explicitName) { - lines.Add($".{nameof(RelationalKeyBuilderExtensions.HasName)}({CSharpUtilities.DelimitString(key.Relational().Name)})"); + lines.Add($".{nameof(RelationalKeyBuilderExtensions.HasName)}({_cSharpUtilities.DelimitString(key.Relational().Name)})"); } AppendMultiLineFluentApi(key.DeclaringEntityType, lines); @@ -288,10 +285,10 @@ private void GenerateTableName(IEntityType entityType) if (explicitTable) { - var parameterString = CSharpUtilities.DelimitString(tableName); + var parameterString = _cSharpUtilities.DelimitString(tableName); if (explicitSchema) { - parameterString += ", " + CSharpUtilities.DelimitString(schema); + parameterString += ", " + _cSharpUtilities.DelimitString(schema); } var lines = new List @@ -312,7 +309,7 @@ private void GenerateIndex(IIndex index) if (!string.IsNullOrEmpty(index.Relational().Name)) { - lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({CSharpUtilities.DelimitString(index.Relational().Name)})"); + lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({_cSharpUtilities.DelimitString(index.Relational().Name)})"); } if (index.IsUnique) @@ -322,7 +319,7 @@ private void GenerateIndex(IIndex index) if (index.Relational().Filter != null) { - lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasFilter)}({CSharpUtilities.DelimitString(index.Relational().Filter)})"); + lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasFilter)}({_cSharpUtilities.DelimitString(index.Relational().Filter)})"); } AppendMultiLineFluentApi(index.DeclaringEntityType, lines); @@ -349,37 +346,37 @@ private void GenerateProperty(IProperty property, bool useDataAnnotations) if (columnName != null && columnName != property.Name) { - lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnName)}({CSharpUtilities.DelimitString(columnName)})"); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnName)}({_cSharpUtilities.DelimitString(columnName)})"); } var columnType = property.Relational().ColumnType; if (columnType != null) { - lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnType)}({CSharpUtilities.DelimitString(columnType)})"); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasColumnType)}({_cSharpUtilities.DelimitString(columnType)})"); } var maxLength = property.GetMaxLength(); if (maxLength.HasValue) { - lines.Add($".{nameof(PropertyBuilder.HasMaxLength)}({CSharpUtilities.GenerateLiteral(maxLength.Value)})"); + lines.Add($".{nameof(PropertyBuilder.HasMaxLength)}({_cSharpUtilities.GenerateLiteral(maxLength.Value)})"); } } if (property.Relational().DefaultValue != null) { - lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValue)}({CSharpUtilities.GenerateLiteral((dynamic)property.Relational().DefaultValue)})"); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValue)}({_cSharpUtilities.GenerateLiteral((dynamic)property.Relational().DefaultValue)})"); } if (property.Relational().DefaultValueSql != null) { - lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValueSql)}({CSharpUtilities.DelimitString(property.Relational().DefaultValueSql)})"); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValueSql)}({_cSharpUtilities.DelimitString(property.Relational().DefaultValueSql)})"); } if (property.Relational().ComputedColumnSql != null) { - lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasComputedColumnSql)}({CSharpUtilities.DelimitString(property.Relational().ComputedColumnSql)})"); + lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasComputedColumnSql)}({_cSharpUtilities.DelimitString(property.Relational().ComputedColumnSql)})"); } var valueGenerated = property.ValueGenerated; @@ -453,7 +450,7 @@ private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotation if (foreignKey.DeleteBehavior != defaultOnDeleteAction) { canUseDataAnnotations = false; - lines.Add($".{nameof(ReferenceReferenceBuilder.OnDelete)}({CSharpUtilities.GenerateLiteral(foreignKey.DeleteBehavior)})"); + lines.Add($".{nameof(ReferenceReferenceBuilder.OnDelete)}({_cSharpUtilities.GenerateLiteral(foreignKey.DeleteBehavior)})"); } if (foreignKey.Relational().Name != @@ -463,7 +460,7 @@ private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotation foreignKey.Properties.Select(p => p.Relational().ColumnName))) { canUseDataAnnotations = false; - lines.Add($".{nameof(RelationalReferenceReferenceBuilderExtensions.HasConstraintName)}({CSharpUtilities.DelimitString(foreignKey.Relational().Name)})"); + lines.Add($".{nameof(RelationalReferenceReferenceBuilderExtensions.HasConstraintName)}({_cSharpUtilities.DelimitString(foreignKey.Relational().Name)})"); } if (!useDataAnnotations || !canUseDataAnnotations) @@ -478,15 +475,15 @@ private void GenerateSequence(ISequence sequence) if (sequence.ClrType != Sequence.DefaultClrType) { - methodName += $"<{CSharpUtilities.GetTypeName(sequence.ClrType)}>"; + methodName += $"<{_cSharpUtilities.GetTypeName(sequence.ClrType)}>"; } - var parameters = CSharpUtilities.DelimitString(sequence.Name); + var parameters = _cSharpUtilities.DelimitString(sequence.Name); if (string.IsNullOrEmpty(sequence.Schema) && sequence.Model.Relational().DefaultSchema != sequence.Schema) { - parameters += $", {CSharpUtilities.DelimitString(sequence.Schema)}"; + parameters += $", {_cSharpUtilities.DelimitString(sequence.Schema)}"; } var lines = new List diff --git a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs index 4f28abe8b8a..e9d49d7224e 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs @@ -31,6 +31,7 @@ public static IServiceCollection AddScaffolding([NotNull] this IServiceCollectio .AddSingleton() .AddSingleton() .AddSingleton() + .AddSingleton() .AddSingleton() .AddSingleton(new DiagnosticListener(DbLoggerCategory.Name)) .AddSingleton(typeof(IDiagnosticsLogger<>), typeof(DiagnosticsLogger<>)) diff --git a/src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs b/src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs index 26ae9714bc1..818d1ba3f4c 100644 --- a/src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs +++ b/src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs @@ -15,12 +15,6 @@ public static class ScaffoldingAnnotationNames /// public const string Prefix = "Scaffolding:"; - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public const string UseProviderMethodName = Prefix + "UseProviderMethodName"; - /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. diff --git a/src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs b/src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs index f42265f29f3..3c90f4a2ce9 100644 --- a/src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs +++ b/src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs @@ -16,18 +16,6 @@ public ScaffoldingModelAnnotations([NotNull] IModel model) { } - public virtual string UseProviderMethodName - { - get { return (string)Annotations.GetAnnotation(ScaffoldingAnnotationNames.UseProviderMethodName); } - [param: CanBeNull] - set - { - Annotations.SetAnnotation( - ScaffoldingAnnotationNames.UseProviderMethodName, - Check.NullButNotEmpty(value, nameof(value))); - } - } - public virtual IDictionary EntityTypeErrors { get diff --git a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs index 75ee56721d0..74a7f020016 100644 --- a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs +++ b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs @@ -34,12 +34,6 @@ public static string ReadOnlyFiles([CanBeNull] object outputDirectoryName, [CanB GetString("ReadOnlyFiles", nameof(outputDirectoryName), nameof(readOnlyFiles)), outputDirectoryName, readOnlyFiles); - /// - /// Cannot scaffold the connection string. The "UseProviderMethodName" is missing from the scaffolding model. - /// - public static string MissingUseProviderMethodNameAnnotation - => GetString("MissingUseProviderMethodNameAnnotation"); - /// /// The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. /// diff --git a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx index 2eb481fd6c3..4b52ead0d25 100644 --- a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx +++ b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx @@ -123,9 +123,6 @@ No files generated in directory {outputDirectoryName}. The following file(s) already exist and must be made writeable to continue: {readOnlyFiles}. - - Cannot scaffold the connection string. The "UseProviderMethodName" is missing from the scaffolding model. - The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. diff --git a/src/EFCore.Relational.Design/breakingchanges.netcore.json b/src/EFCore.Relational.Design/breakingchanges.netcore.json index 12e379f22ea..0b1336a7e4f 100644 --- a/src/EFCore.Relational.Design/breakingchanges.netcore.json +++ b/src/EFCore.Relational.Design/breakingchanges.netcore.json @@ -12,5 +12,15 @@ "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", "MemberId": "public .ctor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory databaseModelFactory, Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService candidateNamingService)", "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", + "MemberId": "public virtual System.String get_UseProviderMethodName()", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", + "MemberId": "public virtual System.Void set_UseProviderMethodName(System.String value)", + "Kind": "Removal" } ] \ No newline at end of file diff --git a/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs b/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs new file mode 100644 index 00000000000..07b61e64821 --- /dev/null +++ b/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs @@ -0,0 +1,12 @@ +// 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 JetBrains.Annotations; + +namespace Microsoft.EntityFrameworkCore.Scaffolding +{ + public interface IScaffoldingHelper + { + string GetProviderOptionsBuilder([NotNull] string connectionString); + } +} diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs index 0d53026e6c6..3e389e0bee2 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs @@ -22,6 +22,7 @@ public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollec => serviceCollection .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); } } diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs index 3d14b8f90b3..2ac53ee7bcb 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs @@ -46,17 +46,6 @@ public SqlServerScaffoldingModelFactory( { } - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public override IModel Create(string connectionString, TableSelectionSet tableSelectionSet) - { - var model = base.Create(connectionString, tableSelectionSet); - model.Scaffolding().UseProviderMethodName = nameof(SqlServerDbContextOptionsExtensions.UseSqlServer); - return model; - } - /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. diff --git a/src/EFCore.SqlServer/EFCore.SqlServer.csproj b/src/EFCore.SqlServer/EFCore.SqlServer.csproj index e63aa530be9..a7e038ef3fb 100644 --- a/src/EFCore.SqlServer/EFCore.SqlServer.csproj +++ b/src/EFCore.SqlServer/EFCore.SqlServer.csproj @@ -18,6 +18,7 @@ + diff --git a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs new file mode 100644 index 00000000000..5c53bceae0a --- /dev/null +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs @@ -0,0 +1,13 @@ +// 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. + +namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal +{ + public class SqlServerScaffoldingHelper : IScaffoldingHelper + { + public virtual string GetProviderOptionsBuilder(string connectionString) + { + return $"{nameof(SqlServerDbContextOptionsExtensions.UseSqlServer)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; + } + } +} diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteDesignTimeServices.cs b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs similarity index 81% rename from src/EFCore.Sqlite.Design/Internal/SqliteDesignTimeServices.cs rename to src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs index 99a7d6c6aef..675c547090d 100644 --- a/src/EFCore.Sqlite.Design/Internal/SqliteDesignTimeServices.cs +++ b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs @@ -1,12 +1,13 @@ // 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.Design; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal +namespace Microsoft.EntityFrameworkCore.Design.Internal { /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -20,8 +21,8 @@ public class SqliteDesignTimeServices : IDesignTimeServices /// public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollection) => serviceCollection - .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); } } diff --git a/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs b/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs index 381dcf2b23e..98015e0aeba 100644 --- a/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs +++ b/src/EFCore.Sqlite.Core/Diagnostics/SqliteEventId.cs @@ -25,7 +25,12 @@ private enum Id { // Model validation events SchemaConfiguredWarning = CoreEventId.ProviderBaseId, - SequenceConfiguredWarning + SequenceConfiguredWarning, + + // Scaffolding events + ColumnFound = CoreEventId.ProviderBaseId + 100, + ForeignKeyColumnFound, + SchemasNotSupportedWarning } private static readonly string _validationPrefix = DbLoggerCategory.Model.Validation.Name + "."; @@ -56,5 +61,26 @@ private enum Id /// /// public static readonly EventId SequenceConfiguredWarning = MakeValidationId(Id.SequenceConfiguredWarning); + + private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; + private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); + + /// + /// A column was found. + /// This event is in the category. + /// + public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); + + /// + /// A column of a foreign key was found. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyColumnFound = MakeScaffoldingId(Id.ForeignKeyColumnFound); + + /// + /// SQLite does not support schemas. + /// This event is in the category. + /// + public static readonly EventId SchemasNotSupportedWarning = MakeScaffoldingId(Id.SchemasNotSupportedWarning); } } diff --git a/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj b/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj index 797d3316381..e52f229e139 100644 --- a/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj +++ b/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj @@ -20,6 +20,7 @@ + diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteDesignLoggerExtensions.cs b/src/EFCore.Sqlite.Core/Internal/SqliteLoggerExtensions.cs similarity index 60% rename from src/EFCore.Sqlite.Design/Internal/SqliteDesignLoggerExtensions.cs rename to src/EFCore.Sqlite.Core/Internal/SqliteLoggerExtensions.cs index e0291225dc9..77775eb6621 100644 --- a/src/EFCore.Sqlite.Design/Internal/SqliteDesignLoggerExtensions.cs +++ b/src/EFCore.Sqlite.Core/Internal/SqliteLoggerExtensions.cs @@ -4,17 +4,82 @@ using System.Diagnostics; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.EntityFrameworkCore.Internal { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class SqliteDesignLoggerExtensions + public static class SqliteLoggerExtensions { + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void SchemaConfiguredWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [NotNull] IEntityType entityType, + [NotNull] string schema) + { + var definition = SqliteStrings.LogSchemaConfigured; + + // Checking for enabled here to avoid string formatting if not needed. + if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) + { + definition.Log(diagnostics, entityType.DisplayName(), schema); + } + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new EntityTypeSchemaEventData( + definition, + SchemaConfiguredWarning, + entityType, + schema)); + } + } + + private static string SchemaConfiguredWarning(EventDefinitionBase definition, EventDataBase payload) + { + var d = (EventDefinition)definition; + var p = (EntityTypeSchemaEventData)payload; + return d.GenerateMessage( + p.EntityType.DisplayName(), + p.Schema); + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void SequenceConfiguredWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [NotNull] ISequence sequence) + { + var definition = SqliteStrings.LogSequenceConfigured; + + definition.Log(diagnostics, sequence.Name); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new SequenceEventData( + definition, + SequenceConfiguredWarning, + sequence)); + } + } + + private static string SequenceConfiguredWarning(EventDefinitionBase definition, EventDataBase payload) + { + var d = (EventDefinition)definition; + var p = (SequenceEventData)payload; + return d.GenerateMessage(p.Sequence.Name); + } + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. @@ -29,7 +94,7 @@ public static void ColumnFound( int? primaryKeyOrdinal, [CanBeNull] string defaultValue) { - var definition = SqliteDesignStrings.LogFoundColumn; + var definition = SqliteStrings.LogFoundColumn; Debug.Assert(LogLevel.Debug == definition.Level); @@ -81,7 +146,7 @@ public static void ForeignKeyColumnFound( [CanBeNull] string deleteAction, int? ordinal) { - var definition = SqliteDesignStrings.LogFoundForeignKeyColumn; + var definition = SqliteStrings.LogFoundForeignKeyColumn; Debug.Assert(LogLevel.Debug == definition.Level); @@ -126,7 +191,7 @@ public static void ForeignKeyColumnFound( public static void SchemasNotSupportedWarning( [NotNull] this IDiagnosticsLogger diagnostics) { - var definition = SqliteDesignStrings.LogUsingSchemaSelectionsWarning; + var definition = SqliteStrings.LogUsingSchemaSelectionsWarning; definition.Log(diagnostics); diff --git a/src/EFCore.Sqlite.Core/Properties/AssemblyInfo.cs b/src/EFCore.Sqlite.Core/Properties/AssemblyInfo.cs index 2cbf52df640..9c3a8b66e1b 100644 --- a/src/EFCore.Sqlite.Core/Properties/AssemblyInfo.cs +++ b/src/EFCore.Sqlite.Core/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ using Microsoft.EntityFrameworkCore.Design; [assembly: DesignTimeProviderServices( - typeName: "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices", - assemblyName: "Microsoft.EntityFrameworkCore.Sqlite.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - packageName: "Microsoft.EntityFrameworkCore.Sqlite.Design")] + typeName: "Microsoft.EntityFrameworkCore.Design.Internal.SqliteDesignTimeServices", + assemblyName: "Microsoft.EntityFrameworkCore.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + packageName: "Microsoft.EntityFrameworkCore.Sqlite")] diff --git a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs index 65c68c242d4..54886c32b77 100644 --- a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs +++ b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.Designer.cs @@ -62,6 +62,36 @@ public static readonly EventDefinition LogSequenceConfigured public static string SequencesNotSupported => GetString("SequencesNotSupported"); + /// + /// SQLite doesn't support schemas. The specified schema selection arguments will be ignored. + /// + public static readonly EventDefinition LogUsingSchemaSelectionsWarning + = new EventDefinition( + SqliteEventId.SchemasNotSupportedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + SqliteEventId.SchemasNotSupportedWarning, + _resourceManager.GetString("LogUsingSchemaSelectionsWarning"))); + + /// + /// Found column on table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, not nullable: {isNotNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}. + /// + public static readonly FallbackEventDefinition LogFoundColumn + = new FallbackEventDefinition( + SqliteEventId.ColumnFound, + LogLevel.Debug, + _resourceManager.GetString("LogFoundColumn")); + + /// + /// Found foreign key column on table: {tableName}, id: {id}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, delete action: {deleteAction}, ordinal: {ordinal}. + /// + public static readonly FallbackEventDefinition LogFoundForeignKeyColumn + = new FallbackEventDefinition( + SqliteEventId.ForeignKeyColumnFound, + LogLevel.Debug, + _resourceManager.GetString("LogFoundForeignKeyColumn")); + private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); diff --git a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx index 6f3ffa9a68b..209b59463b4 100644 --- a/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx +++ b/src/EFCore.Sqlite.Core/Properties/SqliteStrings.resx @@ -134,4 +134,16 @@ SQLite does not support sequences. For more information, see http://go.microsoft.com/fwlink/?LinkId=723262. + + SQLite doesn't support schemas. The specified schema selection arguments will be ignored. + Warning SqliteEventId.SchemasNotSupportedWarning + + + Found column on table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, not nullable: {isNotNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}. + Debug SqliteEventId.ColumnFound string string string int? bool? int? string + + + Found foreign key column on table: {tableName}, id: {id}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, delete action: {deleteAction}, ordinal: {ordinal}. + Debug SqliteEventId.ForeignKeyColumnFound string int string string string string int? + \ No newline at end of file diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs similarity index 96% rename from src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs rename to src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs index b7075a61615..8155fa17b33 100644 --- a/src/EFCore.Sqlite.Design/Internal/SqliteDatabaseModelFactory.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs @@ -7,13 +7,15 @@ using System.Data.Common; using System.Globalization; using System.IO; +using System.Linq; using JetBrains.Annotations; using Microsoft.Data.Sqlite; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -68,6 +70,16 @@ public virtual DatabaseModel Create(string connectionString, TableSelectionSet t Check.NotEmpty(connectionString, nameof(connectionString)); Check.NotNull(tableSelectionSet, nameof(tableSelectionSet)); + if (tableSelectionSet.Schemas.Any()) + { + Logger.SchemasNotSupportedWarning(); + + // we've logged a general warning above that sqlite ignores all + // schema selections so mark all of them as matched so that we don't + // also log warnings about not matching each individual selection + tableSelectionSet.Schemas.ToList().ForEach(s => s.IsMatched = true); + } + using (var connection = new SqliteConnection(connectionString)) { return Create(connection, tableSelectionSet); diff --git a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs new file mode 100644 index 00000000000..404413bd5f9 --- /dev/null +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs @@ -0,0 +1,13 @@ +// 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. + +namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal +{ + public class SqliteScaffoldingHelper : IScaffoldingHelper + { + public virtual string GetProviderOptionsBuilder(string connectionString) + { + return $"{nameof(SqliteDbContextOptionsBuilderExtensions.UseSqlite)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; + } + } +} diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteTableSelectionSetExtensions.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteTableSelectionSetExtensions.cs similarity index 78% rename from src/EFCore.Sqlite.Design/Internal/SqliteTableSelectionSetExtensions.cs rename to src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteTableSelectionSetExtensions.cs index c80607fcf09..6b5f426191f 100644 --- a/src/EFCore.Sqlite.Design/Internal/SqliteTableSelectionSetExtensions.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteTableSelectionSetExtensions.cs @@ -3,10 +3,12 @@ using System; using System.Linq; +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { - internal static class SqliteTableSelectionSetExtensions + public static class SqliteTableSelectionSetExtensions { /// /// Tests whether the table is allowed by the and @@ -16,10 +18,12 @@ internal static class SqliteTableSelectionSetExtensions /// the to test /// name of the database table to check /// whether or not the table is allowed - public static bool Allows(this TableSelectionSet tableSet, string tableName) + public static bool Allows([NotNull] this TableSelectionSet tableSet, [NotNull] string tableName) { - if (tableSet == null - || tableSet.Tables.Count == 0) + Check.NotNull(tableSet, nameof(tableSet)); + Check.NotEmpty(tableName, nameof(tableName)); + + if (tableSet.Tables.Count == 0) { return true; } @@ -29,6 +33,7 @@ public static bool Allows(this TableSelectionSet tableSet, string tableName) var matchingTableSelections = tableSet.Tables.Where( t => t.Text.Equals(tableName, StringComparison.OrdinalIgnoreCase)) .ToList(); + if (matchingTableSelections.Any()) { matchingTableSelections.ForEach(selection => selection.IsMatched = true); diff --git a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteLoggerExtensions.cs b/src/EFCore.Sqlite.Core/Storage/Internal/SqliteLoggerExtensions.cs deleted file mode 100644 index 1540216b096..00000000000 --- a/src/EFCore.Sqlite.Core/Storage/Internal/SqliteLoggerExtensions.cs +++ /dev/null @@ -1,81 +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 JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - public static class SqliteLoggerExtensions - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void SchemaConfiguredWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [NotNull] IEntityType entityType, - [NotNull] string schema) - { - var definition = SqliteStrings.LogSchemaConfigured; - - // Checking for enabled here to avoid string formatting if not needed. - if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) - { - definition.Log(diagnostics, entityType.DisplayName(), schema); - } - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new EntityTypeSchemaEventData( - definition, - SchemaConfiguredWarning, - entityType, - schema)); - } - } - - private static string SchemaConfiguredWarning(EventDefinitionBase definition, EventDataBase payload) - { - var d = (EventDefinition)definition; - var p = (EntityTypeSchemaEventData)payload; - return d.GenerateMessage( - p.EntityType.DisplayName(), - p.Schema); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void SequenceConfiguredWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [NotNull] ISequence sequence) - { - var definition = SqliteStrings.LogSequenceConfigured; - - definition.Log(diagnostics, sequence.Name); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new SequenceEventData( - definition, - SequenceConfiguredWarning, - sequence)); - } - } - - private static string SequenceConfiguredWarning(EventDefinitionBase definition, EventDataBase payload) - { - var d = (EventDefinition)definition; - var p = (SequenceEventData)payload; - return d.GenerateMessage(p.Sequence.Name); - } - } -} diff --git a/src/EFCore.Sqlite.Design/Diagnostics/SqliteDesignEventId.cs b/src/EFCore.Sqlite.Design/Diagnostics/SqliteDesignEventId.cs deleted file mode 100644 index 8585dca3b51..00000000000 --- a/src/EFCore.Sqlite.Design/Diagnostics/SqliteDesignEventId.cs +++ /dev/null @@ -1,53 +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 System.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Diagnostics -{ - /// - /// - /// Event IDs for relational design events that correspond to messages logged to an - /// and events sent to a . - /// - /// - /// These IDs are also used with to configure the - /// behavior of warnings. - /// - /// - public static class SqliteDesignEventId - { - // Warning: These values must not change between releases. - // Only add new values to the end of sections, never in the middle. - // Try to use naming and be consistent with existing names. - private enum Id - { - // Scaffolding events - ColumnFound = CoreEventId.ProviderDesignBaseId, - ForeignKeyColumnFound, - SchemasNotSupportedWarning - } - - private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; - private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); - - /// - /// A column was found. - /// This event is in the category. - /// - public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); - - /// - /// A column of a foreign key was found. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyColumnFound = MakeScaffoldingId(Id.ForeignKeyColumnFound); - - /// - /// SQLite does not support schemas. - /// This event is in the category. - /// - public static readonly EventId SchemasNotSupportedWarning = MakeScaffoldingId(Id.SchemasNotSupportedWarning); - } -} diff --git a/src/EFCore.Sqlite.Design/EFCore.Sqlite.Design.csproj b/src/EFCore.Sqlite.Design/EFCore.Sqlite.Design.csproj deleted file mode 100644 index 26bcf1a98bd..00000000000 --- a/src/EFCore.Sqlite.Design/EFCore.Sqlite.Design.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - Design-time Entity Framework Core functionality for SQLite - netstandard2.0 - Microsoft.EntityFrameworkCore.Sqlite.Design - Microsoft.EntityFrameworkCore - true - $(PackageTags);SQLite - ..\EFCore.ruleset - - - - - - - - - - - - - TextTemplatingFileGenerator - SqliteDesignStrings.Designer.cs - - - - - - - - - - True - True - SqliteDesignStrings.Designer.tt - - - - - - Microsoft.EntityFrameworkCore.Internal - - - - - - - - diff --git a/src/EFCore.Sqlite.Design/Internal/SqliteScaffoldingModelFactory.cs b/src/EFCore.Sqlite.Design/Internal/SqliteScaffoldingModelFactory.cs deleted file mode 100644 index 2966f5226db..00000000000 --- a/src/EFCore.Sqlite.Design/Internal/SqliteScaffoldingModelFactory.cs +++ /dev/null @@ -1,56 +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 System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class SqliteScaffoldingModelFactory : RelationalScaffoldingModelFactory - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public SqliteScaffoldingModelFactory( - [NotNull] IDiagnosticsLogger logger, - [NotNull] IRelationalTypeMapper typeMapper, - [NotNull] IDatabaseModelFactory databaseModelFactory, - [NotNull] CandidateNamingService candidateNamingService, - [NotNull] IPluralizer pluralizer) - : base(logger, typeMapper, databaseModelFactory, candidateNamingService, pluralizer) - { - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public override IModel Create(string connectionString, TableSelectionSet tableSelectionSet) - { - if (tableSelectionSet != null - && tableSelectionSet.Schemas.Any()) - { - Logger.SchemasNotSupportedWarning(); - - // we've logged a general warning above that sqlite ignores all - // schema selections so mark all of them as matched so that we don't - // also log warnings about not matching each individual selection - tableSelectionSet.Schemas.ToList().ForEach(s => s.IsMatched = true); - } - - var model = base.Create(connectionString, tableSelectionSet); - model.Scaffolding().UseProviderMethodName = nameof(SqliteDbContextOptionsBuilderExtensions.UseSqlite); - return model; - } - } -} diff --git a/src/EFCore.Sqlite.Design/Properties/InternalsVisibleTo.cs b/src/EFCore.Sqlite.Design/Properties/InternalsVisibleTo.cs deleted file mode 100644 index ad979bc2bb6..00000000000 --- a/src/EFCore.Sqlite.Design/Properties/InternalsVisibleTo.cs +++ /dev/null @@ -1,6 +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 System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.EntityFrameworkCore.Sqlite.Design.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.cs b/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.cs deleted file mode 100644 index 5bacb92e055..00000000000 --- a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.cs +++ /dev/null @@ -1,62 +0,0 @@ -// - -using System; -using System.Reflection; -using System.Resources; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class SqliteDesignStrings - { - private static readonly ResourceManager _resourceManager - = new ResourceManager("Microsoft.EntityFrameworkCore.Properties.SqliteDesignStrings", typeof(SqliteDesignStrings).GetTypeInfo().Assembly); - - /// - /// Scaffolding from a SQLite database will ignore any schema selection arguments. - /// - public static readonly EventDefinition LogUsingSchemaSelectionsWarning - = new EventDefinition( - SqliteDesignEventId.SchemasNotSupportedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - SqliteDesignEventId.SchemasNotSupportedWarning, - _resourceManager.GetString("LogUsingSchemaSelectionsWarning"))); - - /// - /// Found column on table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, not nullable: {isNotNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}. - /// - public static readonly FallbackEventDefinition LogFoundColumn - = new FallbackEventDefinition( - SqliteDesignEventId.ColumnFound, - LogLevel.Debug, - _resourceManager.GetString("LogFoundColumn")); - - /// - /// Found foreign key column on table: {tableName}, id: {id}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, delete action: {deleteAction}, ordinal: {ordinal}. - /// - public static readonly FallbackEventDefinition LogFoundForeignKeyColumn - = new FallbackEventDefinition( - SqliteDesignEventId.ForeignKeyColumnFound, - LogLevel.Debug, - _resourceManager.GetString("LogFoundForeignKeyColumn")); - - private static string GetString(string name, params string[] formatterNames) - { - var value = _resourceManager.GetString(name); - for (var i = 0; i < formatterNames.Length; i++) - { - value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); - } - - return value; - } - } -} diff --git a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.tt b/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.tt deleted file mode 100644 index 7e50ee38f6c..00000000000 --- a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.Designer.tt +++ /dev/null @@ -1,4 +0,0 @@ -<# - Session["ResourceFile"] = "SqliteDesignStrings.resx"; -#> -<#@ include file="..\..\..\tools\Resources.tt" #> \ No newline at end of file diff --git a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.resx b/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.resx deleted file mode 100644 index 6b998dd7f52..00000000000 --- a/src/EFCore.Sqlite.Design/Properties/SqliteDesignStrings.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Scaffolding from a SQLite database will ignore any schema selection arguments. - Warning SqliteDesignEventId.SchemasNotSupportedWarning - - - Found column on table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, not nullable: {isNotNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}. - Debug SqliteDesignEventId.ColumnFound string string string int? bool? int? string - - - Found foreign key column on table: {tableName}, id: {id}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, delete action: {deleteAction}, ordinal: {ordinal}. - Debug SqliteDesignEventId.ForeignKeyColumnFound string int string string string string int? - - \ No newline at end of file diff --git a/src/EFCore.Sqlite.Design/baseline.netcore.json b/src/EFCore.Sqlite.Design/baseline.netcore.json deleted file mode 100644 index 494bbe1e0b1..00000000000 --- a/src/EFCore.Sqlite.Design/baseline.netcore.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "AssemblyIdentity": "Microsoft.EntityFrameworkCore.Sqlite.Design, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - "Types": [ - { - "Name": "Microsoft.EntityFrameworkCore.Internal.SqliteDesignLoggerExtensions", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "LogWarning", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.SqliteDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "LogDebug", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.SqliteDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Internal.SqliteDesignStrings", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "ColumnNameEmptyOnIndex", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundColumn", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "dataType", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - }, - { - "Name": "isNotNullable", - "Type": "System.Object" - }, - { - "Name": "primaryKeyOrdinal", - "Type": "System.Object" - }, - { - "Name": "defaultValue", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundForeignKeyColumn", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "id", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "principalColumnName", - "Type": "System.Object" - }, - { - "Name": "deleteAction", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundIndex", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "isUnique", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundIndexColumn", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundTable", - "Parameters": [ - { - "Name": "name", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "PrincipalColumnNotFound", - "Parameters": [ - { - "Name": "id", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "principalColumnName", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "PrincipalTableNotFound", - "Parameters": [ - { - "Name": "id", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "TableNotInSelectionSet", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_UsingSchemaSelectionsWarning", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDatabaseModelFactory", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Scaffolding.Internal.IInternalDatabaseModelFactory" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_Logger", - "Parameters": [], - "ReturnType": "Microsoft.Extensions.Logging.ILogger", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connection", - "Type": "System.Data.Common.DbConnection" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.IInternalDatabaseModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteDesignTimeServices", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices" - ], - "Members": [ - { - "Kind": "Method", - "Name": "ConfigureDesignTimeServices", - "Parameters": [ - { - "Name": "serviceCollection", - "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqliteScaffoldingModelFactory", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IModel", - "Virtual": true, - "Override": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "loggerFactory", - "Type": "Microsoft.Extensions.Logging.ILoggerFactory" - }, - { - "Name": "typeMapper", - "Type": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper" - }, - { - "Name": "databaseModelFactory", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory" - }, - { - "Name": "candidateNamingService", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Infrastructure.SqliteDesignEventId", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "IndexMissingColumnNameWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "ForeignKeyReferencesMissingColumn", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "SchemasNotSupportedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - } - ], - "GenericParameters": [] - } - ] -} \ No newline at end of file diff --git a/src/EFCore.Sqlite.Design/breakingchanges.netcore.json b/src/EFCore.Sqlite.Design/breakingchanges.netcore.json deleted file mode 100644 index b0a288cf7da..00000000000 --- a/src/EFCore.Sqlite.Design/breakingchanges.netcore.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.SqliteDesignEventId", - "Kind": "Removal" - } -] \ No newline at end of file diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index 3b438c53f5f..75b2f05588f 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -25,7 +25,7 @@ private void ValidateContextNameInReverseEngineerGenerator(string contextName) new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), new CSharpScaffoldingGenerator( new InMemoryFileService(), - new CSharpDbContextGenerator(CSharpUtilities.Instance), + new CSharpDbContextGenerator(new FakeScaffoldingHelper(), CSharpUtilities.Instance), new CSharpEntityTypeGenerator(CSharpUtilities.Instance)), CSharpUtilities.Instance); @@ -44,5 +44,13 @@ private void ValidateContextNameInReverseEngineerGenerator(string contextName) .Result) .Message); } + + public class FakeScaffoldingHelper : IScaffoldingHelper + { + public string GetProviderOptionsBuilder(string connectionString) + { + throw new NotImplementedException(); + } + } } } diff --git a/test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs b/test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs index 2f4a14030e2..e74697a5be0 100644 --- a/test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs +++ b/test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs @@ -10,20 +10,6 @@ namespace Microsoft.EntityFrameworkCore { public class ScaffoldingMetadataExtenstionsTest { - [Fact] - public void It_adds_provider_method_names() - { - var model = new Model(); - - Assert.Null(model.Scaffolding().UseProviderMethodName); - - model.Scaffolding().UseProviderMethodName = "UsePutRelationalProviderNameHere"; - Assert.Equal("UsePutRelationalProviderNameHere", model.Scaffolding().UseProviderMethodName); - - model.Scaffolding().UseProviderMethodName = null; - Assert.Null(model.Scaffolding().UseProviderMethodName); - } - [Fact] public void It_sets_gets_entity_type_errors() { diff --git a/src/EFCore.Relational.Design.Specification.Tests/DesignTimeProviderServicesTest.cs b/test/EFCore.Relational.Tests/Design/DesignTimeProviderServicesTest.cs similarity index 91% rename from src/EFCore.Relational.Design.Specification.Tests/DesignTimeProviderServicesTest.cs rename to test/EFCore.Relational.Tests/Design/DesignTimeProviderServicesTest.cs index b60924f40dd..2e72e54b781 100644 --- a/src/EFCore.Relational.Design.Specification.Tests/DesignTimeProviderServicesTest.cs +++ b/test/EFCore.Relational.Tests/Design/DesignTimeProviderServicesTest.cs @@ -3,10 +3,9 @@ using System; using System.Reflection; -using Microsoft.EntityFrameworkCore.Design; using Xunit; -namespace Microsoft.EntityFrameworkCore +namespace Microsoft.EntityFrameworkCore.Design { public abstract class DesignTimeProviderServicesTest { diff --git a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs b/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs index 32fd6054d3d..08fe59e45f0 100644 --- a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs +++ b/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs @@ -3,6 +3,7 @@ using System; using System.Reflection; +using Microsoft.EntityFrameworkCore.Design; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Storage.Internal; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj b/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj index 4bf27d3aeae..cad64a1c904 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj +++ b/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj @@ -21,7 +21,6 @@ - diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs index 4c589c42671..bf538fd9deb 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Threading.Tasks; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs index 9ab9dbdfee7..75b6d523a25 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs index 53558b1f834..08f5239412a 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Internal; diff --git a/test/EFCore.Sqlite.Design.Tests/ApiConsistencyTest.cs b/test/EFCore.Sqlite.Design.Tests/ApiConsistencyTest.cs deleted file mode 100644 index ea14d7a5059..00000000000 --- a/test/EFCore.Sqlite.Design.Tests/ApiConsistencyTest.cs +++ /dev/null @@ -1,13 +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 System.Reflection; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; - -namespace Microsoft.EntityFrameworkCore -{ - public class ApiConsistencyTest : ApiConsistencyTestBase - { - protected override Assembly TargetAssembly => typeof(SqliteDatabaseModelFactory).GetTypeInfo().Assembly; - } -} diff --git a/test/EFCore.Sqlite.Design.Tests/EFCore.Sqlite.Design.Tests.csproj b/test/EFCore.Sqlite.Design.Tests/EFCore.Sqlite.Design.Tests.csproj deleted file mode 100644 index b8a1e8e5caf..00000000000 --- a/test/EFCore.Sqlite.Design.Tests/EFCore.Sqlite.Design.Tests.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - net461;netcoreapp2.0 - netcoreapp2.0 - Microsoft.EntityFrameworkCore.Sqlite.Design.Tests - Microsoft.EntityFrameworkCore - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/EFCore.Sqlite.Design.Tests/SqliteDesignEventIdTest.cs b/test/EFCore.Sqlite.Design.Tests/SqliteDesignEventIdTest.cs deleted file mode 100644 index 9fc52c87fb2..00000000000 --- a/test/EFCore.Sqlite.Design.Tests/SqliteDesignEventIdTest.cs +++ /dev/null @@ -1,29 +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 System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; -using Xunit; - -namespace Microsoft.EntityFrameworkCore -{ - public class SqliteDesignEventIdTest - { - [Fact] - public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() - { - var fakeFactories = new Dictionary> - { - { typeof(string), () => "Fake" } - }; - - SqliteTestHelpers.Instance.TestEventLogging( - typeof(SqliteDesignEventId), - typeof(SqliteDesignLoggerExtensions), - fakeFactories); - } - } -} diff --git a/test/EFCore.Sqlite.FunctionalTests/EFCore.Sqlite.FunctionalTests.csproj b/test/EFCore.Sqlite.FunctionalTests/EFCore.Sqlite.FunctionalTests.csproj index 7b6c3ba9a3b..e77af18c607 100644 --- a/test/EFCore.Sqlite.FunctionalTests/EFCore.Sqlite.FunctionalTests.csproj +++ b/test/EFCore.Sqlite.FunctionalTests/EFCore.Sqlite.FunctionalTests.csproj @@ -21,7 +21,6 @@ - diff --git a/test/EFCore.Sqlite.Design.Tests/ScaffoldingTypeMapperSqliteTest.cs b/test/EFCore.Sqlite.Tests/Design/ScaffoldingTypeMapperSqliteTest.cs similarity index 99% rename from test/EFCore.Sqlite.Design.Tests/ScaffoldingTypeMapperSqliteTest.cs rename to test/EFCore.Sqlite.Tests/Design/ScaffoldingTypeMapperSqliteTest.cs index 4e3843fb30a..31083e237f4 100644 --- a/test/EFCore.Sqlite.Design.Tests/ScaffoldingTypeMapperSqliteTest.cs +++ b/test/EFCore.Sqlite.Tests/Design/ScaffoldingTypeMapperSqliteTest.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Storage.Internal; using Xunit; -namespace Microsoft.EntityFrameworkCore +namespace Microsoft.EntityFrameworkCore.Design { public class ScaffoldingTypeMapperSqliteTest { diff --git a/test/EFCore.Sqlite.Design.Tests/SqliteDesignTimeProviderServicesTest.cs b/test/EFCore.Sqlite.Tests/Design/SqliteDesignTimeProviderServicesTest.cs similarity index 85% rename from test/EFCore.Sqlite.Design.Tests/SqliteDesignTimeProviderServicesTest.cs rename to test/EFCore.Sqlite.Tests/Design/SqliteDesignTimeProviderServicesTest.cs index 293a84a6547..7d80684f297 100644 --- a/test/EFCore.Sqlite.Design.Tests/SqliteDesignTimeProviderServicesTest.cs +++ b/test/EFCore.Sqlite.Tests/Design/SqliteDesignTimeProviderServicesTest.cs @@ -3,10 +3,10 @@ using System; using System.Reflection; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Storage.Internal; -namespace Microsoft.EntityFrameworkCore +namespace Microsoft.EntityFrameworkCore.Design { public class SqliteDesignTimeProviderServicesTest : DesignTimeProviderServicesTest { diff --git a/test/EFCore.Sqlite.Design.Tests/SqliteTableSelectionSetExtensionsTests.cs b/test/EFCore.Sqlite.Tests/Design/SqliteTableSelectionSetExtensionsTests.cs similarity index 97% rename from test/EFCore.Sqlite.Design.Tests/SqliteTableSelectionSetExtensionsTests.cs rename to test/EFCore.Sqlite.Tests/Design/SqliteTableSelectionSetExtensionsTests.cs index 01f6d61736b..4d0818e0e2a 100644 --- a/test/EFCore.Sqlite.Design.Tests/SqliteTableSelectionSetExtensionsTests.cs +++ b/test/EFCore.Sqlite.Tests/Design/SqliteTableSelectionSetExtensionsTests.cs @@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Xunit; -namespace Microsoft.EntityFrameworkCore +namespace Microsoft.EntityFrameworkCore.Design { public class SqliteTableSelectionSetExtensionsTests { From 263c102e74898ccf117d8eccabff81b34235f725 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Fri, 26 May 2017 18:27:14 -0700 Subject: [PATCH 07/11] RevEng: Use ScaffoldingTypeMapper --- .../Design/Internal/DatabaseOperations.cs | 2 +- ...ontextScaffolder.cs => ModelScaffolder.cs} | 4 +- .../ScaffoldingServiceCollectionExtensions.cs | 3 +- .../ReverseEngineering/E2ETestBase.cs | 4 +- .../RelationalScaffoldingModelFactory.cs | 25 ++++++---- .../breakingchanges.netcore.json | 48 +++++++++++++++++-- .../Scaffolding/IScaffoldingHelper.cs | 3 ++ .../Scaffolding}/Metadata/ColumnModel.cs | 0 .../Scaffolding}/Metadata/DatabaseModel.cs | 0 .../Metadata/ForeignKeyColumnModel.cs | 0 .../Scaffolding}/Metadata/ForeignKeyModel.cs | 0 .../Scaffolding}/Metadata/IndexColumnModel.cs | 0 .../Scaffolding}/Metadata/IndexModel.cs | 0 .../Internal/ScaffoldingAnnotationNames.cs | 0 .../ScaffoldingEntityTypeAnnotations.cs | 0 .../Metadata/ScaffoldingMetadataExtensions.cs | 0 .../Metadata/ScaffoldingModelAnnotations.cs | 0 .../ScaffoldingPropertyAnnotations.cs | 0 .../Scaffolding}/Metadata/SequenceModel.cs | 0 .../Scaffolding}/Metadata/TableModel.cs | 0 .../Scaffolding}/ScaffoldingTypeMapper.cs | 3 +- .../Scaffolding}/TypeScaffoldingInfo.cs | 0 .../SqlServerScaffoldingModelFactory.cs | 5 +- .../Internal/SqlServerScaffoldingHelper.cs | 43 +++++++++++++++++ .../SqlServerColumnModelAnnotations.cs | 0 .../SqlServerDatabaseModelAnnotationNames.cs | 0 .../SqlServerDatabaseModelAnnotations.cs | 0 .../SqlServerDatabaseModelExtensions.cs | 0 .../SqlServerIndexModelAnnotations.cs | 0 .../Internal/SqliteDesignTimeServices.cs | 2 +- .../Internal/SqliteScaffoldingHelper.cs | 36 ++++++++++++++ .../ReverseEngineeringConfigurationTests.cs | 8 +++- .../RelationalScaffoldingModelFactoryTest.cs | 33 ++++++++++--- .../SqliteScaffoldingModelFactoryTest.cs | 2 +- 34 files changed, 191 insertions(+), 30 deletions(-) rename src/EFCore.Design/Scaffolding/Internal/{DbContextScaffolder.cs => ModelScaffolder.cs} (99%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ColumnModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/DatabaseModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ForeignKeyColumnModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ForeignKeyModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/IndexColumnModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/IndexModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/Internal/ScaffoldingAnnotationNames.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ScaffoldingEntityTypeAnnotations.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ScaffoldingMetadataExtensions.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ScaffoldingModelAnnotations.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/ScaffoldingPropertyAnnotations.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/SequenceModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/Metadata/TableModel.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/ScaffoldingTypeMapper.cs (95%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/TypeScaffoldingInfo.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Metadata/Internal/SqlServerColumnModelAnnotations.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Metadata/Internal/SqlServerDatabaseModelAnnotationNames.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Metadata/Internal/SqlServerDatabaseModelAnnotations.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Metadata/Internal/SqlServerDatabaseModelExtensions.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Metadata/Internal/SqlServerIndexModelAnnotations.cs (100%) diff --git a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs index 3110d4a26c6..61f010af181 100644 --- a/src/EFCore.Design/Design/Internal/DatabaseOperations.cs +++ b/src/EFCore.Design/Design/Internal/DatabaseOperations.cs @@ -62,7 +62,7 @@ public virtual Task ScaffoldContextAsync( loggerFactory.AddProvider(new LoggerProvider(categoryName => new OperationLogger(categoryName, _reporter))); #pragma warning restore CS0618 // Type or member is obsolete - var generator = services.GetRequiredService(); + var generator = services.GetRequiredService(); return generator.GenerateAsync( connectionString, diff --git a/src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs b/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs similarity index 99% rename from src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs rename to src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs index b2560f5b84f..a362b3c331f 100644 --- a/src/EFCore.Design/Scaffolding/Internal/DbContextScaffolder.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs @@ -18,7 +18,7 @@ namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public class DbContextScaffolder + public class ModelScaffolder { private readonly IScaffoldingModelFactory _factory; private readonly CSharpUtilities _cSharpUtilities; @@ -30,7 +30,7 @@ public class DbContextScaffolder /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public DbContextScaffolder( + public ModelScaffolder( [NotNull] IScaffoldingModelFactory scaffoldingModelFactory, [NotNull] ScaffoldingCodeGenerator scaffoldingCodeGenerator, [NotNull] CSharpUtilities cSharpUtilities) diff --git a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs index e9d49d7224e..66638d51dbc 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ScaffoldingServiceCollectionExtensions.cs @@ -24,12 +24,13 @@ public static class ScaffoldingServiceCollectionExtensions public static IServiceCollection AddScaffolding([NotNull] this IServiceCollection serviceCollection) => serviceCollection.AddSingleton() .AddSingleton() - .AddSingleton() + .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() + .AddSingleton() .AddSingleton() .AddSingleton() .AddSingleton() diff --git a/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs b/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs index ae4c6133199..67569f968e6 100644 --- a/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs +++ b/src/EFCore.Relational.Design.Specification.Tests/ReverseEngineering/E2ETestBase.cs @@ -21,7 +21,7 @@ public abstract class E2ETestBase private readonly ITestOutputHelper _output; protected InMemoryOperationReporter _reporter; protected InMemoryFileService InMemoryFiles; - protected readonly DbContextScaffolder Generator; + protected readonly ModelScaffolder Generator; protected readonly IScaffoldingModelFactory ScaffoldingModelFactory; protected E2ETestBase(ITestOutputHelper output) @@ -44,7 +44,7 @@ protected E2ETestBase(ITestOutputHelper output) factory.AddProvider(new LoggerProvider(categoryName => new OperationLogger(categoryName, _reporter))); #pragma warning restore CS0618 // Type or member is obsolete - Generator = serviceProvider.GetRequiredService(); + Generator = serviceProvider.GetRequiredService(); ScaffoldingModelFactory = serviceProvider.GetRequiredService(); } diff --git a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs index 54de7bac5e5..8820aefb896 100644 --- a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs +++ b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs @@ -36,13 +36,15 @@ public class RelationalScaffoldingModelFactory : IScaffoldingModelFactory private readonly IDatabaseModelFactory _databaseModelFactory; private readonly HashSet _unmappedColumns = new HashSet(); private readonly IPluralizer _pluralizer; + private readonly IScaffoldingHelper _scaffoldingHelper; public RelationalScaffoldingModelFactory( [NotNull] IDiagnosticsLogger logger, [NotNull] IRelationalTypeMapper typeMapper, [NotNull] IDatabaseModelFactory databaseModelFactory, [NotNull] CandidateNamingService candidateNamingService, - [NotNull] IPluralizer pluralizer) + [NotNull] IPluralizer pluralizer, + [NotNull] IScaffoldingHelper scaffoldingHelper) { Check.NotNull(logger, nameof(logger)); Check.NotNull(typeMapper, nameof(typeMapper)); @@ -55,6 +57,7 @@ public RelationalScaffoldingModelFactory( CandidateNamingService = candidateNamingService; _databaseModelFactory = databaseModelFactory; _pluralizer = pluralizer; + _scaffoldingHelper = scaffoldingHelper; } public virtual IModel Create(string connectionString, TableSelectionSet tableSelectionSet) @@ -281,16 +284,16 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde Check.NotNull(builder, nameof(builder)); Check.NotNull(column, nameof(column)); - var typeMapping = GetTypeMapping(column); + var typeScaffoldingInfo = _scaffoldingHelper.GetTypeScaffoldingInfo(column); - var clrType = typeMapping?.ClrType; - if (clrType == null) + if (typeScaffoldingInfo == null) { _unmappedColumns.Add(column); Logger.ColumnTypeNotMappedWarning(column.DisplayName, column.DataType); return null; } + var clrType = typeScaffoldingInfo.ClrType; if (column.IsNullable) { clrType = clrType.MakeNullable(); @@ -298,17 +301,21 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde var property = builder.Property(clrType, GetPropertyName(column)); - if (TypeMapper.GetMapping(property.Metadata).StoreType != column.DataType - && !string.IsNullOrWhiteSpace(column.DataType)) + property.HasColumnName(column.Name); + + if (!typeScaffoldingInfo.IsInferred) { property.HasColumnType(column.DataType); } - property.HasColumnName(column.Name); + if (typeScaffoldingInfo.ScaffoldUnicode == true) + { + property.IsUnicode(); + } - if (column.MaxLength.HasValue) + if (typeScaffoldingInfo.ScaffoldMaxLength.HasValue) { - property.HasMaxLength(column.MaxLength.Value); + property.HasMaxLength(typeScaffoldingInfo.ScaffoldMaxLength.Value); } if (column.ValueGenerated == ValueGenerated.OnAdd) diff --git a/src/EFCore.Relational.Design/breakingchanges.netcore.json b/src/EFCore.Relational.Design/breakingchanges.netcore.json index 0b1336a7e4f..9057122f0cd 100644 --- a/src/EFCore.Relational.Design/breakingchanges.netcore.json +++ b/src/EFCore.Relational.Design/breakingchanges.netcore.json @@ -14,13 +14,55 @@ "Kind": "Removal" }, { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", - "MemberId": "public virtual System.String get_UseProviderMethodName()", + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", "Kind": "Removal" }, { "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", - "MemberId": "public virtual System.Void set_UseProviderMethodName(System.String value)", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.SequenceModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldingTypeMapper", + "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.TypeScaffoldingInfo", + "Kind": "Removal" + }, + { + "TypeId": "public static class Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions", "Kind": "Removal" } ] \ No newline at end of file diff --git a/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs b/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs index 07b61e64821..8006bdf336c 100644 --- a/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs +++ b/src/EFCore.Relational/Scaffolding/IScaffoldingHelper.cs @@ -2,11 +2,14 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; namespace Microsoft.EntityFrameworkCore.Scaffolding { public interface IScaffoldingHelper { string GetProviderOptionsBuilder([NotNull] string connectionString); + + TypeScaffoldingInfo GetTypeScaffoldingInfo([NotNull] ColumnModel columnModel); } } diff --git a/src/EFCore.Relational.Design/Metadata/ColumnModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ColumnModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/DatabaseModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/DatabaseModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/DatabaseModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/DatabaseModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/ForeignKeyColumnModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/ForeignKeyColumnModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ForeignKeyColumnModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ForeignKeyColumnModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/ForeignKeyModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/ForeignKeyModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ForeignKeyModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ForeignKeyModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/IndexColumnModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/IndexColumnModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/IndexColumnModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/IndexColumnModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/IndexModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/IndexModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/IndexModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/IndexModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs b/src/EFCore.Relational/Scaffolding/Metadata/Internal/ScaffoldingAnnotationNames.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/Internal/ScaffoldingAnnotationNames.cs rename to src/EFCore.Relational/Scaffolding/Metadata/Internal/ScaffoldingAnnotationNames.cs diff --git a/src/EFCore.Relational.Design/Metadata/ScaffoldingEntityTypeAnnotations.cs b/src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingEntityTypeAnnotations.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ScaffoldingEntityTypeAnnotations.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingEntityTypeAnnotations.cs diff --git a/src/EFCore.Relational.Design/Metadata/ScaffoldingMetadataExtensions.cs b/src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingMetadataExtensions.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ScaffoldingMetadataExtensions.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingMetadataExtensions.cs diff --git a/src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs b/src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingModelAnnotations.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ScaffoldingModelAnnotations.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingModelAnnotations.cs diff --git a/src/EFCore.Relational.Design/Metadata/ScaffoldingPropertyAnnotations.cs b/src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingPropertyAnnotations.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/ScaffoldingPropertyAnnotations.cs rename to src/EFCore.Relational/Scaffolding/Metadata/ScaffoldingPropertyAnnotations.cs diff --git a/src/EFCore.Relational.Design/Metadata/SequenceModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/SequenceModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/SequenceModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/SequenceModel.cs diff --git a/src/EFCore.Relational.Design/Metadata/TableModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/TableModel.cs similarity index 100% rename from src/EFCore.Relational.Design/Metadata/TableModel.cs rename to src/EFCore.Relational/Scaffolding/Metadata/TableModel.cs diff --git a/src/EFCore.Relational.Design/ScaffoldingTypeMapper.cs b/src/EFCore.Relational/Scaffolding/ScaffoldingTypeMapper.cs similarity index 95% rename from src/EFCore.Relational.Design/ScaffoldingTypeMapper.cs rename to src/EFCore.Relational/Scaffolding/ScaffoldingTypeMapper.cs index 2a53d969814..ae54c7d0ac3 100644 --- a/src/EFCore.Relational.Design/ScaffoldingTypeMapper.cs +++ b/src/EFCore.Relational/Scaffolding/ScaffoldingTypeMapper.cs @@ -24,7 +24,8 @@ public virtual TypeScaffoldingInfo FindMapping( bool keyOrIndex, bool rowVersion) { - Check.NotEmpty(storeType, nameof(storeType)); + // This is because certain providers can have no type specified as a default type e.g. SQLite + Check.NotNull(storeType, nameof(storeType)); var mapping = TypeMapper.FindMapping(storeType); if (mapping == null) diff --git a/src/EFCore.Relational.Design/TypeScaffoldingInfo.cs b/src/EFCore.Relational/Scaffolding/TypeScaffoldingInfo.cs similarity index 100% rename from src/EFCore.Relational.Design/TypeScaffoldingInfo.cs rename to src/EFCore.Relational/Scaffolding/TypeScaffoldingInfo.cs diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs index 2ac53ee7bcb..95182412e5c 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs @@ -41,8 +41,9 @@ public SqlServerScaffoldingModelFactory( [NotNull] IRelationalTypeMapper typeMapper, [NotNull] IDatabaseModelFactory databaseModelFactory, [NotNull] CandidateNamingService candidateNamingService, - [NotNull] IPluralizer pluralizer) - : base(logger, typeMapper, databaseModelFactory, candidateNamingService, pluralizer) + [NotNull] IPluralizer pluralizer, + [NotNull] IScaffoldingHelper scaffoldingHelper) + : base(logger, typeMapper, databaseModelFactory, candidateNamingService, pluralizer, scaffoldingHelper) { } diff --git a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs index 5c53bceae0a..5678ed55767 100644 --- a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs @@ -1,13 +1,56 @@ // 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 JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Utilities; + namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { public class SqlServerScaffoldingHelper : IScaffoldingHelper { + private readonly ScaffoldingTypeMapper _scaffoldingTypeMapper; + + public SqlServerScaffoldingHelper([NotNull] ScaffoldingTypeMapper scaffoldingTypeMapper) + { + Check.NotNull(scaffoldingTypeMapper, nameof(scaffoldingTypeMapper)); + + _scaffoldingTypeMapper = scaffoldingTypeMapper; + } + public virtual string GetProviderOptionsBuilder(string connectionString) { return $"{nameof(SqlServerDbContextOptionsExtensions.UseSqlServer)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; } + + public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) + { + if (columnModel.DataType == null) + { + return null; + } + + string underlyingDataType = null; + columnModel.Table.Database.SqlServer().TypeAliases?.TryGetValue( + SchemaQualifiedKey(columnModel.DataType, columnModel.SqlServer().DataTypeSchemaName), out underlyingDataType); + + var dataType = underlyingDataType ?? (columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : "")); + + var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); + + if (underlyingDataType != null) + { + return new TypeScaffoldingInfo( + typeScaffoldingInfo.ClrType, + inferred: false, + scaffoldUnicode: typeScaffoldingInfo.ScaffoldUnicode, + scaffoldMaxLength: typeScaffoldingInfo.ScaffoldMaxLength); + } + + return typeScaffoldingInfo; + } + + private static string SchemaQualifiedKey(string name, string schema = null) => "[" + (schema ?? "") + "].[" + name + "]"; } } diff --git a/src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerColumnModelAnnotations.cs b/src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerColumnModelAnnotations.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerColumnModelAnnotations.cs rename to src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerColumnModelAnnotations.cs diff --git a/src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelAnnotationNames.cs b/src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelAnnotationNames.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelAnnotationNames.cs rename to src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelAnnotationNames.cs diff --git a/src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelAnnotations.cs b/src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelAnnotations.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelAnnotations.cs rename to src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelAnnotations.cs diff --git a/src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelExtensions.cs b/src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelExtensions.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerDatabaseModelExtensions.cs rename to src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerDatabaseModelExtensions.cs diff --git a/src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerIndexModelAnnotations.cs b/src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerIndexModelAnnotations.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Metadata/Internal/SqlServerIndexModelAnnotations.cs rename to src/EFCore.SqlServer/Scaffolding/Metadata/Internal/SqlServerIndexModelAnnotations.cs diff --git a/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs index 675c547090d..01f14738e10 100644 --- a/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs +++ b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs @@ -25,4 +25,4 @@ public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollec .AddSingleton() .AddSingleton(); } -} +} \ No newline at end of file diff --git a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs index 404413bd5f9..4b9cbc1bae9 100644 --- a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs @@ -1,13 +1,49 @@ // 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 JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; +using Microsoft.EntityFrameworkCore.Utilities; + namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal { public class SqliteScaffoldingHelper : IScaffoldingHelper { + private readonly ScaffoldingTypeMapper _scaffoldingTypeMapper; + + public SqliteScaffoldingHelper([NotNull] ScaffoldingTypeMapper scaffoldingTypeMapper) + { + Check.NotNull(scaffoldingTypeMapper, nameof(scaffoldingTypeMapper)); + + _scaffoldingTypeMapper = scaffoldingTypeMapper; + } + public virtual string GetProviderOptionsBuilder(string connectionString) { return $"{nameof(SqliteDbContextOptionsBuilderExtensions.UseSqlite)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; } + + public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) + { + if (columnModel.DataType == null) + { + return null; + } + + var dataType = columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : ""); + + var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); + + if (columnModel.DataType == "") + { + return new TypeScaffoldingInfo( + typeScaffoldingInfo.ClrType, + inferred: true, + scaffoldUnicode: typeScaffoldingInfo.ScaffoldUnicode, + scaffoldMaxLength: typeScaffoldingInfo.ScaffoldMaxLength); + } + + return typeScaffoldingInfo; + } } } diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index 75b2f05588f..e8944a44342 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -4,6 +4,7 @@ using System; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.ReverseEngineering; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.EntityFrameworkCore.TestUtilities; using Xunit; @@ -21,7 +22,7 @@ public void Throws_exceptions_for_invalid_context_name() private void ValidateContextNameInReverseEngineerGenerator(string contextName) { - var reverseEngineer = new DbContextScaffolder( + var reverseEngineer = new ModelScaffolder( new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), new CSharpScaffoldingGenerator( new InMemoryFileService(), @@ -51,6 +52,11 @@ public string GetProviderOptionsBuilder(string connectionString) { throw new NotImplementedException(); } + + public TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) + { + throw new NotImplementedException(); + } } } } diff --git a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs b/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs index 507df32684c..a8d1c78bac7 100644 --- a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs @@ -36,7 +36,7 @@ public RelationalDatabaseModelFactoryTest() _factory = new FakeScaffoldingModelFactory( new DiagnosticsLogger( loggerFactory, - new LoggingOptions(), + new LoggingOptions(), new DiagnosticListener("Fake"))); } @@ -104,8 +104,7 @@ public void Loads_column_types() { Name = "salary", DataType = "long", - IsNullable = true, - MaxLength = 100 + IsNullable = true }, new ColumnModel { @@ -169,7 +168,6 @@ public void Loads_column_types() Assert.Equal("Salary", col5.Name); Assert.Equal(typeof(long?), col5.ClrType); Assert.True(col5.IsColumnNullable()); - Assert.Equal(100, col5.GetMaxLength()); Assert.Null(col5.Relational().DefaultValue); }); } @@ -905,7 +903,7 @@ public void Pluralization_of_entity_and_DbSet() var factory = new FakeScaffoldingModelFactory( new DiagnosticsLogger( new TestDesignLoggerFactory(), - new LoggingOptions(), + new LoggingOptions(), new DiagnosticListener("Fake")), new FakePluralizer()); @@ -1007,8 +1005,31 @@ public FakeScaffoldingModelFactory( new TestTypeMapper(new RelationalTypeMapperDependencies()), new FakeDatabaseModelFactory(), new CandidateNamingService(), - pluralizer) + pluralizer, + new FakeScaffoldingHelper()) + { + } + } + + public class FakeScaffoldingHelper : IScaffoldingHelper + { + public string GetProviderOptionsBuilder(string connectionString) { + throw new NotImplementedException(); + } + + public TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) + { + if (columnModel.DataType == null) + { + return null; + } + + var dataType = columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : ""); + + var scaffoldingTypeMapper = new ScaffoldingTypeMapper(new TestTypeMapper(new RelationalTypeMapperDependencies())); + + return scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); } } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs index 08f5239412a..fc7b6bccb5c 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs @@ -51,7 +51,7 @@ public void It_loads_column_types() Assert.NotNull(entityType); Assert.Equal("Column Types", entityType.Sqlite().TableName); - Assert.Equal("text", entityType.FindProperty("Col1").Sqlite().ColumnType); + Assert.Null(entityType.FindProperty("Col1").Sqlite().ColumnType); Assert.Equal(typeof(string), entityType.FindProperty("Col1").ClrType); Assert.Equal("unsigned big int", entityType.FindProperty("Col2").Sqlite().ColumnType); From 58c8f8100b98beb3ed003c10c7f1ef59141ff050 Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Wed, 31 May 2017 18:21:44 -0700 Subject: [PATCH 08/11] RevEng: Actually use ScaffoldingTypeMapper Remove special processing around type mapping in SqlServerScaffoldingModelFactory Change ColumnModel.StoreType to have fully qualified type name for ScaffoldingTypeMapper --- .../Internal/CSharpDbContextGenerator.cs | 5 + .../RelationalScaffoldingModelFactory.cs | 51 ++++++---- .../Scaffolding/Metadata/ColumnModel.cs | 9 +- .../Internal/SqlServerDatabaseModelFactory.cs | 69 +++++++------ .../SqlServerScaffoldingModelFactory.cs | 97 +------------------ .../Internal/SqlServerScaffoldingHelper.cs | 6 +- .../Internal/SqliteDatabaseModelFactory.cs | 2 +- .../Internal/SqliteScaffoldingHelper.cs | 8 +- .../RelationalScaffoldingModelFactoryTest.cs | 80 ++++++++------- .../ReverseEngineering/E2E.sql | 4 + .../AllFluentApi/AllDataTypes.expected | 4 + ...rverReverseEngineerTestE2EContext.expected | 46 ++++++--- .../Expected/Attributes/AllDataTypes.expected | 36 ++++--- .../Attributes/AttributesContext.expected | 20 ++++ .../Attributes/PropertyConfiguration.expected | 2 +- .../ReverseEngineering/SqlServerE2ETests.cs | 4 +- .../SqlServerDatabaseModelFactoryTest.cs | 46 +++++---- .../SqliteDatabaseModelFactoryTest.cs | 11 +-- 18 files changed, 245 insertions(+), 255 deletions(-) diff --git a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs index da948cf42a3..8db2502e8dc 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs @@ -364,6 +364,11 @@ private void GenerateProperty(IProperty property, bool useDataAnnotations) } } + if (property.IsUnicode() != null) + { + lines.Add($".{nameof(PropertyBuilder.IsUnicode)}({(property.IsUnicode() == false ? _cSharpUtilities.GenerateLiteral(false) : "")})"); + } + if (property.Relational().DefaultValue != null) { lines.Add($".{nameof(RelationalPropertyBuilderExtensions.HasDefaultValue)}({_cSharpUtilities.GenerateLiteral((dynamic)property.Relational().DefaultValue)})"); diff --git a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs index 8820aefb896..0d807a3b83a 100644 --- a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs +++ b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs @@ -120,7 +120,8 @@ protected virtual string GetPropertyName([NotNull] ColumnModel column) if (!_columnNamers.ContainsKey(table)) { - _columnNamers.Add(table, + _columnNamers.Add( + table, new CSharpUniqueNamer( c => CandidateNamingService.GenerateCandidateIdentifier(c.Name), usedNames)); } @@ -289,7 +290,7 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde if (typeScaffoldingInfo == null) { _unmappedColumns.Add(column); - Logger.ColumnTypeNotMappedWarning(column.DisplayName, column.DataType); + Logger.ColumnTypeNotMappedWarning(column.DisplayName, column.StoreType); return null; } @@ -305,12 +306,12 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde if (!typeScaffoldingInfo.IsInferred) { - property.HasColumnType(column.DataType); + property.HasColumnType(column.StoreType); } - if (typeScaffoldingInfo.ScaffoldUnicode == true) + if (typeScaffoldingInfo.ScaffoldUnicode.HasValue) { - property.IsUnicode(); + property.IsUnicode(typeScaffoldingInfo.ScaffoldUnicode.Value); } if (typeScaffoldingInfo.ScaffoldMaxLength.HasValue) @@ -356,7 +357,7 @@ protected virtual RelationalTypeMapping GetTypeMapping([NotNull] ColumnModel col { Check.NotNull(column, nameof(column)); - return column.DataType == null ? null : TypeMapper.FindMapping(column.DataType); + return column.StoreType == null ? null : TypeMapper.FindMapping(column.StoreType); } protected virtual KeyBuilder VisitPrimaryKey([NotNull] EntityTypeBuilder builder, [NotNull] TableModel table) @@ -377,7 +378,8 @@ protected virtual KeyBuilder VisitPrimaryKey([NotNull] EntityTypeBuilder builder var unmappedColumns = keyColumns .Where(c => _unmappedColumns.Contains(c)) - .Select(c => c.Name).ToList(); + .Select(c => c.Name) + .ToList(); if (unmappedColumns.Any()) { Logger.PrimaryKeyColumnsNotMappedWarning(table.DisplayName, unmappedColumns); @@ -407,10 +409,12 @@ protected virtual IndexBuilder VisitIndex([NotNull] EntityTypeBuilder builder, [ var indexColumns = index.IndexColumns .OrderBy(ic => ic.Ordinal) - .Select(ic => ic.Column).ToList(); + .Select(ic => ic.Column) + .ToList(); var unmappedColumns = indexColumns .Where(c => _unmappedColumns.Contains(c)) - .Select(c => c.Name).ToList(); + .Select(c => c.Name) + .ToList(); if (unmappedColumns.Any()) { Logger.IndexColumnsNotMappedWarning(index.Name, unmappedColumns); @@ -424,7 +428,8 @@ protected virtual IndexBuilder VisitIndex([NotNull] EntityTypeBuilder builder, [ var primaryKeyColumns = index.Table.Columns .Where(c => c.PrimaryKeyOrdinal.HasValue) .OrderBy(c => c.PrimaryKeyOrdinal); - if (columnNames.SequenceEqual(primaryKeyColumns.Select(c => c.Name)) && index.Filter == null) + if (columnNames.SequenceEqual(primaryKeyColumns.Select(c => c.Name)) + && index.Filter == null) { // index is supporting the primary key. So there is no need for // an extra index in the model. But if the index name does not @@ -537,11 +542,13 @@ protected virtual IMutableForeignKey VisitForeignKey([NotNull] ModelBuilder mode } var principalPropertiesMap = foreignKeyColumns - .Select(fc => new Tuple( - principalEntityType.FindProperty(GetPropertyName(fc.PrincipalColumn)), - fc.PrincipalColumn)); + .Select( + fc => new Tuple( + principalEntityType.FindProperty(GetPropertyName(fc.PrincipalColumn)), + fc.PrincipalColumn)); var principalProperties = principalPropertiesMap - .Select(tuple => tuple.Item1).ToList(); + .Select(tuple => tuple.Item1) + .ToList(); var principalKey = principalEntityType.FindKey(principalProperties); if (principalKey == null) @@ -557,12 +564,13 @@ protected virtual IMutableForeignKey VisitForeignKey([NotNull] ModelBuilder mode if (nullablePrincipalProperties.Any()) { Logger.ForeignKeyPrincipalEndContainsNullableColumnsWarning( - foreignKey.DisplayName, - index.Relational().Name, - nullablePrincipalProperties.Select(tuple => tuple.Item2.DisplayName).ToList()); + foreignKey.DisplayName, + index.Relational().Name, + nullablePrincipalProperties.Select(tuple => tuple.Item2.DisplayName).ToList()); nullablePrincipalProperties - .ToList().ForEach(tuple => tuple.Item1.IsNullable = false); + .ToList() + .ForEach(tuple => tuple.Item1.IsNullable = false); } principalKey = principalEntityType.AddKey(principalProperties); } @@ -571,7 +579,7 @@ protected virtual IMutableForeignKey VisitForeignKey([NotNull] ModelBuilder mode var principalColumns = foreignKeyColumns.Select(c => c.PrincipalColumn.Name).ToList(); Logger.ForeignKeyReferencesMissingPrincipalKeyWarning( - foreignKey.DisplayName, principalEntityType.DisplayName(), principalColumns); + foreignKey.DisplayName, principalEntityType.DisplayName(), principalColumns); return null; } @@ -583,7 +591,7 @@ protected virtual IMutableForeignKey VisitForeignKey([NotNull] ModelBuilder mode var dependentKey = dependentEntityType.FindKey(dependentProperties); var dependentIndex = dependentEntityType.FindIndex(dependentProperties); key.IsUnique = dependentKey != null - || (dependentIndex != null && dependentIndex.IsUnique); + || (dependentIndex != null && dependentIndex.IsUnique); key.Relational().Name = foreignKey.Name; @@ -616,7 +624,8 @@ protected virtual void AddNavigationProperties([NotNull] IMutableForeignKey fore : CandidateNamingService.GetPrincipalEndCandidateNavigationPropertyName( foreignKey, dependentEndNavigationPropertyName); - if (!foreignKey.IsUnique && !foreignKey.IsSelfReferencing()) + if (!foreignKey.IsUnique + && !foreignKey.IsSelfReferencing()) { principalEndNavigationPropertyCandidateName = _pluralizer.Pluralize(principalEndNavigationPropertyCandidateName); } diff --git a/src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs b/src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs index 8d83eb60b10..470522fd381 100644 --- a/src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs +++ b/src/EFCore.Relational/Scaffolding/Metadata/ColumnModel.cs @@ -14,17 +14,10 @@ public class ColumnModel : Annotatable public virtual int? PrimaryKeyOrdinal { get; [param: CanBeNull] set; } public virtual int Ordinal { get; [param: NotNull] set; } public virtual bool IsNullable { get; [param: NotNull] set; } - - public virtual string DataType { get; [param: CanBeNull] set; } - + public virtual string StoreType { get; [param: CanBeNull] set; } public virtual string DefaultValue { get; [param: CanBeNull] set; } - public virtual string ComputedValue { get; [param: CanBeNull] set; } - public virtual int? MaxLength { get; [param: CanBeNull] set; } - public virtual int? Precision { get; [param: CanBeNull] set; } - public virtual int? Scale { get; [param: CanBeNull] set; } public virtual ValueGenerated? ValueGenerated { get; set; } - public virtual string DisplayName { get diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs index 0b67d4b6e28..995ce844035 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs @@ -9,7 +9,6 @@ using System.Diagnostics; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Internal; @@ -38,11 +37,13 @@ public class SqlServerDatabaseModelFactory : IDatabaseModelFactory /// directly from your code. This API may change or be removed in future releases. /// public static string SchemaQualifiedKey([NotNull] string name, [CanBeNull] string schema = null) => "[" + (schema ?? "") + "].[" + name + "]"; + private static string TableKey(TableModel table) => SchemaQualifiedKey(table.Name, table.SchemaName); private static string ColumnKey(TableModel table, string columnName) => TableKey(table) + ".[" + columnName + "]"; private static readonly ISet _dateTimePrecisionTypes = new HashSet { "datetimeoffset", "datetime2", "time" }; private const int DefaultDateTimePrecision = 7; + // see https://msdn.microsoft.com/en-us/library/ff878091.aspx private static readonly Dictionary _defaultSequenceMinMax = new Dictionary(StringComparer.OrdinalIgnoreCase) { @@ -143,8 +144,10 @@ private DatabaseModel Create(DbConnection connection, TableSelectionSet tableSel private bool SupportsSequences => _serverVersion?.Major >= 11; private string MemoryOptimizedTableColumn => - _serverVersion?.Major >= 12 ? @", - t.is_memory_optimized" : string.Empty; + _serverVersion?.Major >= 12 + ? @", + t.is_memory_optimized" + : string.Empty; private string TemporalTableWhereClause => _serverVersion?.Major >= 13 ? " AND t.temporal_type <> 1" : string.Empty; @@ -233,8 +236,9 @@ private void GetSequences() Max = reader.GetValueOrDefault("maximum_value") }; - Logger.SequenceFound(sequence.DisplayName, sequence.DataType, sequence.IsCyclic, - sequence.IncrementBy, sequence.Start, sequence.Min, sequence.Max); + Logger.SequenceFound( + sequence.DisplayName, sequence.DataType, sequence.IsCyclic, + sequence.IncrementBy, sequence.Start, sequence.Min, sequence.Max); if (string.IsNullOrEmpty(sequence.Name)) { @@ -342,8 +346,8 @@ RIGHT JOIN (SELECT * FROM sys.indexes WHERE is_primary_key = 1) AS i ON i.object LEFT JOIN sys.computed_columns cc ON cc.object_id = c.object_id AND cc.column_id = c.column_id JOIN sys.tables AS t ON t.object_id = c.object_id WHERE t.name <> '" + HistoryRepository.DefaultTableName + "'" + - TemporalTableWhereClause + - IsHiddenColumnWhereClause; + TemporalTableWhereClause + + IsHiddenColumnWhereClause; using (var reader = command.ExecuteReader()) { @@ -381,15 +385,17 @@ WHERE t.name <> '" + HistoryRepository.DefaultTableName + "'" + continue; } - TableModel table; - if (!_tables.TryGetValue(SchemaQualifiedKey(tableName, schemaName), out table)) + if (!_tables.TryGetValue(SchemaQualifiedKey(tableName, schemaName), out var table)) { Logger.MissingTableWarning(DisplayName(schemaName, tableName)); continue; } - if (dataTypeName == "nvarchar" - || dataTypeName == "nchar") + // TODO: Check for aliased type and skip following processing altogether + + if ((dataTypeName == "nvarchar" + || dataTypeName == "nchar") + && maxLength != -1) { maxLength /= 2; } @@ -397,38 +403,43 @@ WHERE t.name <> '" + HistoryRepository.DefaultTableName + "'" + if (dataTypeName == "decimal" || dataTypeName == "numeric") { - // maxlength here represents storage bytes. The server determines this, not the client. - maxLength = null; + dataTypeName = $"{dataTypeName}({precision}, {scale})"; } - - var dateTimePrecision = default(int?); - if (_dateTimePrecisionTypes.Contains(dataTypeName)) + else if (_dateTimePrecisionTypes.Contains(dataTypeName) + && scale != null) { - dateTimePrecision = scale ?? DefaultDateTimePrecision; - scale = null; + dataTypeName = $"{dataTypeName}({scale})"; + } + else + { + if (maxLength == -1) + { + dataTypeName = $"{dataTypeName}(max)"; + } + else if (maxLength.HasValue) + { + dataTypeName = $"{dataTypeName}({maxLength.Value})"; + } } var column = new ColumnModel { Table = table, - DataType = dataTypeName, Name = columnName, + StoreType = dataTypeName, Ordinal = ordinal - 1, IsNullable = nullable, PrimaryKeyOrdinal = primaryKeyOrdinal, DefaultValue = defaultValue, ComputedValue = computedValue, - Precision = precision, - Scale = scale, - MaxLength = maxLength <= 0 ? default(int?) : maxLength, ValueGenerated = isIdentity ? ValueGenerated.OnAdd : isComputed || dataTypeName == "timestamp" ? ValueGenerated.OnAddOrUpdate : default(ValueGenerated?) }; + column.SqlServer().IsIdentity = isIdentity; - column.SqlServer().DateTimePrecision = dateTimePrecision; column.SqlServer().DataTypeSchemaName = dataTypeSchemaName; table.Columns.Add(column); @@ -476,7 +487,7 @@ AND object_name(i.object_id) <> '" + HistoryRepository.DefaultTableName + @"'" + var filterDefinition = reader.GetValueOrDefault("filter_definition"); Logger.IndexColumnFound( - DisplayName(schemaName, tableName), indexName, isUnique, columnName, indexOrdinal); + DisplayName(schemaName, tableName), indexName, isUnique, columnName, indexOrdinal); if (!_tableSelectionSet.Allows(schemaName, tableName)) { @@ -522,7 +533,7 @@ AND object_name(i.object_id) <> '" + HistoryRepository.DefaultTableName + @"'" + } else if (!_tableColumns.TryGetValue(ColumnKey(index.Table, columnName), out column)) { - Logger.IndexColumnsNotMappedWarning(indexName, new [] { columnName }); + Logger.IndexColumnsNotMappedWarning(indexName, new[] { columnName }); } else { @@ -577,8 +588,8 @@ FROM sys.foreign_keys AS f var ordinal = reader.GetValueOrDefault("constraint_column_id"); Logger.ForeignKeyColumnFound( - DisplayName(schemaName, tableName), fkName, DisplayName(principalTableSchemaName, principalTableName), - fromColumnName, toColumnName, updateAction, deleteAction, ordinal); + DisplayName(schemaName, tableName), fkName, DisplayName(principalTableSchemaName, principalTableName), + fromColumnName, toColumnName, updateAction, deleteAction, ordinal); if (string.IsNullOrEmpty(fkName)) { @@ -612,7 +623,7 @@ FROM sys.foreign_keys AS f if (principalTable == null) { Logger.ForeignKeyReferencesMissingPrincipalTableWarning( - fkName, DisplayName(schemaName, tableName), DisplayName(principalTableSchemaName, principalTableName)); + fkName, DisplayName(schemaName, tableName), DisplayName(principalTableSchemaName, principalTableName)); } fkInfo = new ForeignKeyModel @@ -653,7 +664,7 @@ FROM sys.foreign_keys AS f private static string DisplayName(string schema, string name) => (!string.IsNullOrEmpty(schema) ? schema + "." : "") + name; - + private ColumnModel FindColumnForForeignKey( string columnName, TableModel table, string fkName) { diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs index 95182412e5c..92355d5c6bf 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs +++ b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs @@ -60,8 +60,6 @@ protected override PropertyBuilder VisitColumn(EntityTypeBuilder builder, Column return null; } - VisitTypeMapping(propertyBuilder, column); - VisitDefaultValue(propertyBuilder, column); VisitComputedValue(propertyBuilder, column); @@ -76,13 +74,13 @@ protected override PropertyBuilder VisitColumn(EntityTypeBuilder builder, Column protected override RelationalTypeMapping GetTypeMapping(ColumnModel column) { RelationalTypeMapping mapping = null; - if (column.DataType != null) + if (column.StoreType != null) { string underlyingDataType = null; column.Table.Database.SqlServer().TypeAliases?.TryGetValue( - SqlServerDatabaseModelFactory.SchemaQualifiedKey(column.DataType, column.SqlServer().DataTypeSchemaName), out underlyingDataType); + SqlServerDatabaseModelFactory.SchemaQualifiedKey(column.StoreType, column.SqlServer().DataTypeSchemaName), out underlyingDataType); - mapping = TypeMapper.FindMapping(underlyingDataType ?? column.DataType); + mapping = TypeMapper.FindMapping(underlyingDataType ?? column.StoreType); } return mapping; @@ -144,95 +142,6 @@ protected override IndexBuilder VisitIndex(EntityTypeBuilder builder, IndexModel return indexBuilder; } - private void VisitTypeMapping(PropertyBuilder propertyBuilder, ColumnModel column) - { - if (column.SqlServer().IsIdentity) - { - if (typeof(byte) == propertyBuilder.Metadata.ClrType) - { - Logger.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning( - column.DisplayName, column.DataType); - } - else - { - propertyBuilder - .ValueGeneratedOnAdd() - .UseSqlServerIdentityColumn(); - } - } - - var dateTimePrecision = column.SqlServer().DateTimePrecision; - if (dateTimePrecision.HasValue - && dateTimePrecision.Value != DefaultTimeTimePrecision) - { - propertyBuilder.Metadata.SetMaxLength(null); - propertyBuilder.HasColumnType( - string.Format(CultureInfo.InvariantCulture, "{0}({1})", column.DataType, dateTimePrecision.Value)); - } - else if (!HasTypeAlias(column)) - { - var qualifiedColumnTypeAndMaxLength = - MaxLengthQualifiedDataType(column.DataType, column.MaxLength); - if (qualifiedColumnTypeAndMaxLength != null) - { - propertyBuilder.HasColumnType(qualifiedColumnTypeAndMaxLength.Item1); - propertyBuilder.Metadata.SetMaxLength(qualifiedColumnTypeAndMaxLength.Item2); - } - } - - var columnType = propertyBuilder.Metadata.SqlServer().ColumnType; - if (columnType != null) - { - TypeMapper.ValidateTypeName(columnType); - } - } - - private static bool HasTypeAlias(ColumnModel column) - => column.DataType != null - && column.Table.Database.SqlServer().TypeAliases?.ContainsKey( - SqlServerDatabaseModelFactory.SchemaQualifiedKey(column.DataType, column.SqlServer().DataTypeSchemaName)) == true; - - // Turns an unqualified SQL Server type name (e.g. varchar) and its - // max length into a qualified SQL Server type name (e.g. varchar(max)) - // and its max length for use on string and byte[] properties. - // Null for either value in the tuple means don't use that value. - // A null tuple means don't change anything. - private Tuple MaxLengthQualifiedDataType( - string unqualifiedTypeName, int? maxLength) - { - var typeMapping = TypeMapper.FindMapping(unqualifiedTypeName); - if (typeMapping != null - && (typeof(string) == typeMapping.ClrType - || typeof(byte[]) == typeMapping.ClrType) - && !_stringAndByteArrayTypesForbiddingMaxLength.Contains(unqualifiedTypeName)) - { - if (typeMapping.StoreType == "nvarchar" - || typeMapping.StoreType == "varbinary") - { - // nvarchar is the default column type for string properties, - // so we don't need to define it using HasColumnType() and removing - // the column type allows the HasMaxLength() API to have effect. - // Similarly for varbinary and byte[] properties. - return new Tuple(null, maxLength); - } - if (_dataTypesAllowingMaxLengthMax.Contains(typeMapping.StoreType)) - { - return new Tuple( - unqualifiedTypeName - + "(" - + (maxLength?.ToString(CultureInfo.InvariantCulture) ?? "max") - + ")", - null); - } - return new Tuple( - unqualifiedTypeName - + (maxLength == null ? string.Empty : "(" + maxLength + ")"), - null); - } - - return null; - } - private void VisitDefaultValue(PropertyBuilder propertyBuilder, ColumnModel column) { if (column.DefaultValue != null) diff --git a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs index 5678ed55767..4afca4493e2 100644 --- a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs @@ -26,16 +26,16 @@ public virtual string GetProviderOptionsBuilder(string connectionString) public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) { - if (columnModel.DataType == null) + if (columnModel.StoreType == null) { return null; } string underlyingDataType = null; columnModel.Table.Database.SqlServer().TypeAliases?.TryGetValue( - SchemaQualifiedKey(columnModel.DataType, columnModel.SqlServer().DataTypeSchemaName), out underlyingDataType); + SchemaQualifiedKey(columnModel.StoreType, columnModel.SqlServer().DataTypeSchemaName), out underlyingDataType); - var dataType = underlyingDataType ?? (columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : "")); + var dataType = underlyingDataType ?? columnModel.StoreType; var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); diff --git a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs index 8155fa17b33..080a90d672d 100644 --- a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs @@ -200,7 +200,7 @@ private void GetColumns() { Table = table, Name = columnName, - DataType = dataType, + StoreType = dataType, Ordinal = ordinal++, IsNullable = !notNull && !isPk, PrimaryKeyOrdinal = isPk ? primaryKeyOrdinal : default(int?), diff --git a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs index 4b9cbc1bae9..26fdec85f83 100644 --- a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs @@ -25,16 +25,14 @@ public virtual string GetProviderOptionsBuilder(string connectionString) public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) { - if (columnModel.DataType == null) + if (columnModel.StoreType == null) { return null; } - var dataType = columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : ""); + var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping(columnModel.StoreType, keyOrIndex: false, rowVersion: false); - var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); - - if (columnModel.DataType == "") + if (columnModel.StoreType == "") { return new TypeScaffoldingInfo( typeScaffoldingInfo.ClrType, diff --git a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs b/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs index a8d1c78bac7..cd385f2cd62 100644 --- a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs @@ -26,7 +26,7 @@ public class RelationalDatabaseModelFactoryTest { private readonly FakeScaffoldingModelFactory _factory; private readonly TestDesignLoggerFactory.DesignLogger _logger; - private static ColumnModel IdColumn => new ColumnModel { Name = "Id", DataType = "long", PrimaryKeyOrdinal = 0 }; + private static ColumnModel IdColumn => new ColumnModel { Name = "Id", StoreType = "long", PrimaryKeyOrdinal = 0 }; public RelationalDatabaseModelFactoryTest() { @@ -97,32 +97,32 @@ public void Loads_column_types() new ColumnModel { Name = "occupation", - DataType = "string", + StoreType = "string", DefaultValue = "\"dev\"" }, new ColumnModel { Name = "salary", - DataType = "long", + StoreType = "long", IsNullable = true }, new ColumnModel { Name = "modified", - DataType = "string", + StoreType = "string", IsNullable = false, ValueGenerated = ValueGenerated.OnAddOrUpdate }, new ColumnModel { Name = "created", - DataType = "string", + StoreType = "string", ValueGenerated = ValueGenerated.OnAdd }, new ColumnModel { Name = "current", - DataType = "string", + StoreType = "string", ComputedValue = "compute_this()" } } @@ -175,7 +175,7 @@ public void Loads_column_types() [Theory] [InlineData("string", null)] [InlineData("alias for string", "alias for string")] - public void Column_type_annotation(string dataType, string expectedColumnType) + public void Column_type_annotation(string StoreType, string expectedColumnType) { var info = new DatabaseModel { @@ -189,7 +189,7 @@ public void Column_type_annotation(string dataType, string expectedColumnType) new ColumnModel { Name = "Col", - DataType = dataType, + StoreType = StoreType, PrimaryKeyOrdinal = 1 } } @@ -217,20 +217,20 @@ public void Column_ordinal_annotation() new ColumnModel { Name = "Col1", - DataType = "string", + StoreType = "string", PrimaryKeyOrdinal = 1, Ordinal = 1 }, new ColumnModel { Name = "Col2", - DataType = "string", + StoreType = "string", Ordinal = 2 }, new ColumnModel { Name = "Col3", - DataType = "string", + StoreType = "string", Ordinal = 3 } } @@ -251,7 +251,7 @@ public void Column_ordinal_annotation() [Theory] [InlineData("cheese")] [InlineData(null)] - public void Unmappable_column_type(string dataType) + public void Unmappable_column_type(string StoreType) { var info = new DatabaseModel { @@ -271,11 +271,11 @@ public void Unmappable_column_type(string dataType) { Table = info.Tables.First(), Name = "Coli", - DataType = dataType + StoreType = StoreType }); Assert.Single(_factory.Create(info).FindEntityType("E").GetProperties()); - Assert.Single(_logger.Statements, t => t.Contains(RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("E.Coli", dataType))); + Assert.Single(_logger.Statements, t => t.Contains(RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("E.Coli", StoreType))); } [Theory] @@ -292,7 +292,7 @@ public void Primary_key(string[] keyProps, int length) new TableModel { Name = "PkTable", - Columns = keyProps.Select(k => new ColumnModel { PrimaryKeyOrdinal = ordinal++, Name = k, DataType = "long" }).ToList() + Columns = keyProps.Select(k => new ColumnModel { PrimaryKeyOrdinal = ordinal++, Name = k, StoreType = "long" }).ToList() } } }; @@ -309,9 +309,9 @@ public void Indexes_and_alternate_keys() Name = "T", Columns = { - new ColumnModel { Name = "C1", DataType = "long", PrimaryKeyOrdinal = 1 }, - new ColumnModel { Name = "C2", DataType = "long" }, - new ColumnModel { Name = "C3", DataType = "long" } + new ColumnModel { Name = "C1", StoreType = "long", PrimaryKeyOrdinal = 1 }, + new ColumnModel { Name = "C2", StoreType = "long" }, + new ColumnModel { Name = "C3", StoreType = "long" } } }; table.Indexes.Add( @@ -395,7 +395,7 @@ public void Foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "ParentId", DataType = "long", IsNullable = true } + new ColumnModel { Name = "ParentId", StoreType = "long", IsNullable = true } } }; childrenTable.ForeignKeys.Add( @@ -473,8 +473,8 @@ public void Composite_foreign_key() Name = "Parent", Columns = { - new ColumnModel { Name = "Id_A", DataType = "long", PrimaryKeyOrdinal = 1 }, - new ColumnModel { Name = "Id_B", DataType = "long", PrimaryKeyOrdinal = 2 } + new ColumnModel { Name = "Id_A", StoreType = "long", PrimaryKeyOrdinal = 1 }, + new ColumnModel { Name = "Id_B", StoreType = "long", PrimaryKeyOrdinal = 2 } } }; var childrenTable = new TableModel @@ -483,8 +483,8 @@ public void Composite_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "ParentId_A", DataType = "long" }, - new ColumnModel { Name = "ParentId_B", DataType = "long" } + new ColumnModel { Name = "ParentId_A", StoreType = "long" }, + new ColumnModel { Name = "ParentId_B", StoreType = "long" } } }; childrenTable.ForeignKeys.Add( @@ -539,7 +539,7 @@ public void It_loads_self_referencing_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "ParentId", DataType = "long", IsNullable = false } + new ColumnModel { Name = "ParentId", StoreType = "long", IsNullable = false } } }; table.ForeignKeys.Add( @@ -578,7 +578,7 @@ public void It_logs_warning_for_bad_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "NotPkId", DataType = "long", PrimaryKeyOrdinal = null } + new ColumnModel { Name = "NotPkId", StoreType = "long", PrimaryKeyOrdinal = null } } }; var childrenTable = new TableModel @@ -587,7 +587,7 @@ public void It_logs_warning_for_bad_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "ParentId", DataType = "long" } + new ColumnModel { Name = "ParentId", StoreType = "long" } } }; childrenTable.ForeignKeys.Add( @@ -624,7 +624,7 @@ public void Unique_nullable_index_unused_by_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "BuddyId", DataType = "long", IsNullable = true } + new ColumnModel { Name = "BuddyId", StoreType = "long", IsNullable = true } } }; table.Indexes.Add( @@ -671,7 +671,7 @@ public void Unique_nullable_index_used_by_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "BuddyId", DataType = "long", IsNullable = true } + new ColumnModel { Name = "BuddyId", StoreType = "long", IsNullable = true } } }; table.Indexes.Add( @@ -724,8 +724,8 @@ public void Unique_index_composite_foreign_key() Name = "Parent", Columns = { - new ColumnModel { Name = "Id_A", DataType = "long", PrimaryKeyOrdinal = 1 }, - new ColumnModel { Name = "Id_B", DataType = "long", PrimaryKeyOrdinal = 2 } + new ColumnModel { Name = "Id_A", StoreType = "long", PrimaryKeyOrdinal = 1 }, + new ColumnModel { Name = "Id_B", StoreType = "long", PrimaryKeyOrdinal = 2 } } }; var childrenTable = new TableModel @@ -734,8 +734,8 @@ public void Unique_index_composite_foreign_key() Columns = { IdColumn, - new ColumnModel { Name = "ParentId_A", DataType = "long" }, - new ColumnModel { Name = "ParentId_B", DataType = "long" } + new ColumnModel { Name = "ParentId_A", StoreType = "long" }, + new ColumnModel { Name = "ParentId_B", StoreType = "long" } } }; childrenTable.Indexes.Add( @@ -792,16 +792,16 @@ public void Unique_names() Name = "E F", Columns = { - new ColumnModel { Name = "San itized", DataType = "long" }, - new ColumnModel { Name = "San+itized", DataType = "long" } + new ColumnModel { Name = "San itized", StoreType = "long" }, + new ColumnModel { Name = "San+itized", StoreType = "long" } } }, new TableModel { Name = "E+F" } } }; - info.Tables.ElementAt(0).Columns.Add(new ColumnModel { Name = "Id", DataType = "long", PrimaryKeyOrdinal = 0, Table = info.Tables.ElementAt(0) }); - info.Tables.ElementAt(1).Columns.Add(new ColumnModel { Name = "Id", DataType = "long", PrimaryKeyOrdinal = 0, Table = info.Tables.ElementAt(1) }); + info.Tables.ElementAt(0).Columns.Add(new ColumnModel { Name = "Id", StoreType = "long", PrimaryKeyOrdinal = 0, Table = info.Tables.ElementAt(0) }); + info.Tables.ElementAt(1).Columns.Add(new ColumnModel { Name = "Id", StoreType = "long", PrimaryKeyOrdinal = 0, Table = info.Tables.ElementAt(1) }); var model = _factory.Create(info); @@ -936,7 +936,7 @@ public void Pluralization_of_collection_navigations() Columns = { IdColumn, - new ColumnModel { Name = "BlogId", DataType = "long", IsNullable = true } + new ColumnModel { Name = "BlogId", StoreType = "long", IsNullable = true } } }; @@ -1020,16 +1020,14 @@ public string GetProviderOptionsBuilder(string connectionString) public TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) { - if (columnModel.DataType == null) + if (columnModel.StoreType == null) { return null; } - var dataType = columnModel.DataType + (columnModel.MaxLength.HasValue ? $"({columnModel.MaxLength.Value})" : ""); - var scaffoldingTypeMapper = new ScaffoldingTypeMapper(new TestTypeMapper(new RelationalTypeMapperDependencies())); - return scaffoldingTypeMapper.FindMapping(dataType, keyOrIndex: false, rowVersion: false); + return scaffoldingTypeMapper.FindMapping(columnModel.StoreType, keyOrIndex: false, rowVersion: false); } } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql index dc519d1c10d..fd0e591f380 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql @@ -116,9 +116,13 @@ CREATE TABLE "dbo"."AllDataTypes" ( bigintColumn bigint NOT NULL, bitColumn bit NOT NULL, decimalColumn decimal NOT NULL, + decimal105Column decimal(10,5) NOT NULL, + decimalDefaultColumn decimal(18,2) NOT NULL, intColumn int NOT NULL, moneyColumn money NOT NULL, numericColumn numeric NOT NULL, + numeric152Column numeric(15,2) NOT NULL, + numericDefaultColumn numeric(18,2) NOT NULL, smallintColumn smallint NOT NULL, smallmoneyColumn smallmoney NOT NULL, tinyintColumn tinyint NOT NULL, diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected index 50dd2378fb8..7353e36dfed 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected @@ -9,9 +9,13 @@ namespace E2ETest.Namespace public long BigintColumn { get; set; } public bool BitColumn { get; set; } public decimal DecimalColumn { get; set; } + public decimal Decimal105Column { get; set; } + public decimal DecimalDefaultColumn { get; set; } public int IntColumn { get; set; } public decimal MoneyColumn { get; set; } public decimal NumericColumn { get; set; } + public decimal Numeric152Column { get; set; } + public decimal NumericDefaultColumn { get; set; } public short SmallintColumn { get; set; } public decimal SmallmoneyColumn { get; set; } public byte TinyintColumn { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected index 4e50d2656b9..e70cd262846 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected @@ -71,15 +71,17 @@ namespace E2ETest.Namespace entity.Property(e => e.CharVarying144Column) .HasColumnName("charVarying144Column") - .HasColumnType("varchar(144)"); + .HasMaxLength(144) + .IsUnicode(false); entity.Property(e => e.CharVaryingColumn) .HasColumnName("charVaryingColumn") - .HasColumnType("varchar(1)"); + .HasMaxLength(1) + .IsUnicode(false); entity.Property(e => e.CharVaryingMaxColumn) .HasColumnName("charVaryingMaxColumn") - .HasColumnType("varchar(max)"); + .IsUnicode(false); entity.Property(e => e.Character155Column) .HasColumnName("character155Column") @@ -91,15 +93,17 @@ namespace E2ETest.Namespace entity.Property(e => e.CharacterVarying166Column) .HasColumnName("characterVarying166Column") - .HasColumnType("varchar(166)"); + .HasMaxLength(166) + .IsUnicode(false); entity.Property(e => e.CharacterVaryingColumn) .HasColumnName("characterVaryingColumn") - .HasColumnType("varchar(1)"); + .HasMaxLength(1) + .IsUnicode(false); entity.Property(e => e.CharacterVaryingMaxColumn) .HasColumnName("characterVaryingMaxColumn") - .HasColumnType("varchar(max)"); + .IsUnicode(false); entity.Property(e => e.DateColumn) .HasColumnName("dateColumn") @@ -121,9 +125,15 @@ namespace E2ETest.Namespace entity.Property(e => e.DatetimeoffsetColumn).HasColumnName("datetimeoffsetColumn"); + entity.Property(e => e.Decimal105Column) + .HasColumnName("decimal105Column") + .HasColumnType("decimal(10, 5)"); + entity.Property(e => e.DecimalColumn) .HasColumnName("decimalColumn") - .HasColumnType("decimal"); + .HasColumnType("decimal(18, 0)"); + + entity.Property(e => e.DecimalDefaultColumn).HasColumnName("decimalDefaultColumn"); entity.Property(e => e.FloatColumn).HasColumnName("floatColumn"); @@ -177,9 +187,17 @@ namespace E2ETest.Namespace .HasColumnName("ntextColumn") .HasColumnType("ntext"); + entity.Property(e => e.Numeric152Column) + .HasColumnName("numeric152Column") + .HasColumnType("numeric(15, 2)"); + entity.Property(e => e.NumericColumn) .HasColumnName("numericColumn") - .HasColumnType("numeric"); + .HasColumnType("numeric(18, 0)"); + + entity.Property(e => e.NumericDefaultColumn) + .HasColumnName("numericDefaultColumn") + .HasColumnType("numeric(18, 2)"); entity.Property(e => e.Nvarchar100Column) .HasColumnName("nvarchar100Column") @@ -238,15 +256,17 @@ namespace E2ETest.Namespace entity.Property(e => e.Varchar66Column) .HasColumnName("varchar66Column") - .HasColumnType("varchar(66)"); + .HasMaxLength(66) + .IsUnicode(false); entity.Property(e => e.VarcharColumn) .HasColumnName("varcharColumn") - .HasColumnType("varchar(1)"); + .HasMaxLength(1) + .IsUnicode(false); entity.Property(e => e.VarcharMaxColumn) .HasColumnName("varcharMaxColumn") - .HasColumnType("varchar(max)"); + .IsUnicode(false); entity.Property(e => e.XmlColumn) .HasColumnName("xmlColumn") @@ -500,7 +520,9 @@ namespace E2ETest.Namespace .HasColumnType("money") .HasDefaultValueSql("((0.00))"); - entity.Property(e => e.WithVarcharNullDefaultValue).HasColumnType("varchar(1)"); + entity.Property(e => e.WithVarcharNullDefaultValue) + .HasMaxLength(1) + .IsUnicode(false); }); modelBuilder.Entity(entity => diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected index df5dc34bb06..0fb15052d55 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected @@ -13,14 +13,22 @@ namespace E2ETest.Namespace public long BigintColumn { get; set; } [Column("bitColumn")] public bool BitColumn { get; set; } - [Column("decimalColumn", TypeName = "decimal")] + [Column("decimalColumn", TypeName = "decimal(18, 0)")] public decimal DecimalColumn { get; set; } + [Column("decimal105Column", TypeName = "decimal(10, 5)")] + public decimal Decimal105Column { get; set; } + [Column("decimalDefaultColumn")] + public decimal DecimalDefaultColumn { get; set; } [Column("intColumn")] public int IntColumn { get; set; } [Column("moneyColumn", TypeName = "money")] public decimal MoneyColumn { get; set; } - [Column("numericColumn", TypeName = "numeric")] + [Column("numericColumn", TypeName = "numeric(18, 0)")] public decimal NumericColumn { get; set; } + [Column("numeric152Column", TypeName = "numeric(15, 2)")] + public decimal Numeric152Column { get; set; } + [Column("numericDefaultColumn", TypeName = "numeric(18, 2)")] + public decimal NumericDefaultColumn { get; set; } [Column("smallintColumn")] public short SmallintColumn { get; set; } [Column("smallmoneyColumn", TypeName = "smallmoney")] @@ -55,11 +63,13 @@ namespace E2ETest.Namespace public string Char10Column { get; set; } [Column("textColumn", TypeName = "text")] public string TextColumn { get; set; } - [Column("varcharColumn", TypeName = "varchar(1)")] + [Column("varcharColumn")] + [StringLength(1)] public string VarcharColumn { get; set; } - [Column("varchar66Column", TypeName = "varchar(66)")] + [Column("varchar66Column")] + [StringLength(66)] public string Varchar66Column { get; set; } - [Column("varcharMaxColumn", TypeName = "varchar(max)")] + [Column("varcharMaxColumn")] public string VarcharMaxColumn { get; set; } [Column("ncharColumn", TypeName = "nchar(1)")] public string NcharColumn { get; set; } @@ -105,21 +115,25 @@ namespace E2ETest.Namespace public byte[] BinaryVarying133Column { get; set; } [Column("binaryVaryingMaxColumn")] public byte[] BinaryVaryingMaxColumn { get; set; } - [Column("charVaryingColumn", TypeName = "varchar(1)")] + [Column("charVaryingColumn")] + [StringLength(1)] public string CharVaryingColumn { get; set; } - [Column("charVarying144Column", TypeName = "varchar(144)")] + [Column("charVarying144Column")] + [StringLength(144)] public string CharVarying144Column { get; set; } - [Column("charVaryingMaxColumn", TypeName = "varchar(max)")] + [Column("charVaryingMaxColumn")] public string CharVaryingMaxColumn { get; set; } [Column("characterColumn", TypeName = "char(1)")] public string CharacterColumn { get; set; } [Column("character155Column", TypeName = "char(155)")] public string Character155Column { get; set; } - [Column("characterVaryingColumn", TypeName = "varchar(1)")] + [Column("characterVaryingColumn")] + [StringLength(1)] public string CharacterVaryingColumn { get; set; } - [Column("characterVarying166Column", TypeName = "varchar(166)")] + [Column("characterVarying166Column")] + [StringLength(166)] public string CharacterVarying166Column { get; set; } - [Column("characterVaryingMaxColumn", TypeName = "varchar(max)")] + [Column("characterVaryingMaxColumn")] public string CharacterVaryingMaxColumn { get; set; } [Column("nationalCharacterColumn", TypeName = "nchar(1)")] public string NationalCharacterColumn { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected index 268a089d187..cb238089bbe 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected @@ -37,7 +37,25 @@ namespace E2ETest.Namespace { modelBuilder.Entity(entity => { + entity.Property(e => e.CharVarying144Column).IsUnicode(false); + + entity.Property(e => e.CharVaryingColumn).IsUnicode(false); + + entity.Property(e => e.CharVaryingMaxColumn).IsUnicode(false); + + entity.Property(e => e.CharacterVarying166Column).IsUnicode(false); + + entity.Property(e => e.CharacterVaryingColumn).IsUnicode(false); + + entity.Property(e => e.CharacterVaryingMaxColumn).IsUnicode(false); + entity.Property(e => e.TimestampColumn).ValueGeneratedOnAddOrUpdate(); + + entity.Property(e => e.Varchar66Column).IsUnicode(false); + + entity.Property(e => e.VarcharColumn).IsUnicode(false); + + entity.Property(e => e.VarcharMaxColumn).IsUnicode(false); }); modelBuilder.Entity(entity => @@ -162,6 +180,8 @@ namespace E2ETest.Namespace entity.Property(e => e.WithGuidDefaultExpression).HasDefaultValueSql("(newsequentialid())"); entity.Property(e => e.WithMoneyDefaultValue).HasDefaultValueSql("((0.00))"); + + entity.Property(e => e.WithVarcharNullDefaultValue).IsUnicode(false); }); modelBuilder.Entity(entity => diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected index b1d0835826b..83fd1ba4d8c 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected @@ -13,7 +13,7 @@ namespace E2ETest.Namespace public DateTime WithDateFixedDefault { get; set; } public DateTime? WithDateNullDefault { get; set; } public Guid WithGuidDefaultExpression { get; set; } - [Column(TypeName = "varchar(1)")] + [StringLength(1)] public string WithVarcharNullDefaultValue { get; set; } public int WithDefaultValue { get; set; } public short? WithNullDefaultValue { get; set; } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index 6abd779d515..72919f6e33b 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -122,7 +122,7 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), RelationalDesignStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), - SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), + //SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), RelationalDesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") @@ -173,7 +173,7 @@ public void E2ETest_AllFluentApi() RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), RelationalDesignStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), - SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), + //SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), RelationalDesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs b/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs index 1d80ffd707e..6340b4ecd14 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs @@ -194,7 +194,7 @@ Primary Key (Name, Id) id => { Assert.Equal("Id", id.Name); - Assert.Equal("int", id.DataType); + Assert.Equal("int", id.StoreType); Assert.Equal(2, id.PrimaryKeyOrdinal); Assert.False(id.IsNullable); Assert.Equal(0, id.Ordinal); @@ -203,42 +203,48 @@ Primary Key (Name, Id) name => { Assert.Equal("Name", name.Name); - Assert.Equal("nvarchar", name.DataType); + Assert.Equal("nvarchar(100)", name.StoreType); Assert.Equal(1, name.PrimaryKeyOrdinal); Assert.False(name.IsNullable); Assert.Equal(1, name.Ordinal); Assert.Null(name.DefaultValue); - Assert.Equal(100, name.MaxLength); }, lat => { Assert.Equal("Latitude", lat.Name); - Assert.Equal("decimal", lat.DataType); + Assert.Equal("decimal(5, 2)", lat.StoreType); Assert.Null(lat.PrimaryKeyOrdinal); Assert.True(lat.IsNullable); Assert.Equal(2, lat.Ordinal); Assert.Equal("((0.0))", lat.DefaultValue); - Assert.Equal(5, lat.Precision); - Assert.Equal(2, lat.Scale); - Assert.Null(lat.MaxLength); - Assert.Null(lat.SqlServer().DateTimePrecision); }, created => { Assert.Equal("Created", created.Name); - Assert.Null(created.Scale); - Assert.Equal(6, created.SqlServer().DateTimePrecision); + Assert.Equal("datetime2(6)", created.StoreType); + Assert.Null(created.PrimaryKeyOrdinal); + Assert.True(created.IsNullable); + Assert.Equal(3, created.Ordinal); Assert.Equal("('October 20, 2015 11am')", created.DefaultValue); }, discovered => { Assert.Equal("DiscoveredDate", discovered.Name); - Assert.Equal(7, discovered.SqlServer().DateTimePrecision); + Assert.Equal("datetime2", discovered.StoreType); + Assert.Null(discovered.PrimaryKeyOrdinal); + Assert.True(discovered.IsNullable); + Assert.Equal(4, discovered.Ordinal); + Assert.Null(discovered.DefaultValue); + }, current => { Assert.Equal("CurrentDate", current.Name); - Assert.Equal("datetime", current.DataType); + Assert.Equal("datetime", current.StoreType); + Assert.Null(current.PrimaryKeyOrdinal); + Assert.False(current.IsNullable); + Assert.Equal(5, current.Ordinal); + Assert.Null(current.DefaultValue); Assert.Equal("(getdate())", current.ComputedValue); }, sum => @@ -250,24 +256,24 @@ Primary Key (Name, Id) { Assert.Equal("Modified", modified.Name); Assert.Equal(ValueGenerated.OnAddOrUpdate, modified.ValueGenerated); - Assert.Equal("timestamp", modified.DataType); // intentional - testing the alias + Assert.Equal("timestamp", modified.StoreType); // intentional - testing the alias }); } [Theory] - [InlineData("nvarchar(55)", 55)] - [InlineData("varchar(341)", 341)] - [InlineData("nchar(14)", 14)] - [InlineData("char(89)", 89)] - [InlineData("varchar(max)", null)] - public void It_reads_max_length(string type, int? length) + [InlineData("nvarchar(55)")] + [InlineData("varchar(341)")] + [InlineData("nchar(14)")] + [InlineData("char(89)")] + [InlineData("varchar(max)")] + public void It_reads_max_length(string type) { var sql = @"IF OBJECT_ID('dbo.Strings', 'U') IS NOT NULL DROP TABLE [dbo].[Strings];" + "CREATE TABLE [dbo].[Strings] ( CharColumn " + type + ");"; var db = CreateModel(sql, new TableSelectionSet(new List { "Strings" })); - Assert.Equal(length, db.Tables.Single().Columns.Single().MaxLength); + Assert.Equal(type, db.Tables.Single().Columns.Single().StoreType); } [Theory] diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs index 75b6d523a25..7458753442a 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteDatabaseModelFactoryTest.cs @@ -140,7 +140,7 @@ Created datetime DEFAULT('October 20, 2015 11am') id => { Assert.Equal("Id", id.Name); - Assert.Equal("integer", id.DataType); + Assert.Equal("integer", id.StoreType); Assert.Equal(1, id.PrimaryKeyOrdinal); Assert.False(id.IsNullable); Assert.Equal(0, id.Ordinal); @@ -149,7 +149,7 @@ Created datetime DEFAULT('October 20, 2015 11am') name => { Assert.Equal("Name", name.Name); - Assert.Equal("string", name.DataType); + Assert.Equal("string", name.StoreType); Assert.Null(name.PrimaryKeyOrdinal); Assert.False(name.IsNullable); Assert.Equal(1, name.Ordinal); @@ -158,19 +158,16 @@ Created datetime DEFAULT('October 20, 2015 11am') lat => { Assert.Equal("Latitude", lat.Name); - Assert.Equal("numeric", lat.DataType); + Assert.Equal("numeric", lat.StoreType); Assert.Null(lat.PrimaryKeyOrdinal); Assert.True(lat.IsNullable); Assert.Equal(2, lat.Ordinal); Assert.Equal("0.0", lat.DefaultValue); - Assert.Null(lat.Precision); - Assert.Null(lat.Scale); - Assert.Null(lat.MaxLength); }, created => { Assert.Equal("Created", created.Name); - Assert.Equal("datetime", created.DataType); + Assert.Equal("datetime", created.StoreType); Assert.Equal("'October 20, 2015 11am'", created.DefaultValue); }); } From 5f32dc2a233a315999c1eaee55e3470ac10a934f Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 1 Jun 2017 09:24:26 -0700 Subject: [PATCH 09/11] Test: Change expected files of reverse engineering testing to have .cs extension for easy formatting --- ...re.SqlServer.Design.FunctionalTests.csproj | 6 ++- ...{AllDataTypes.expected => AllDataTypes.cs} | 0 ...ndent.expected => MultipleFKsDependent.cs} | 0 ...cipal.expected => MultipleFKsPrincipal.cs} | 0 ...pendent.expected => OneToManyDependent.cs} | 0 ...incipal.expected => OneToManyPrincipal.cs} | 0 ...ependent.expected => OneToOneDependent.cs} | 0 ...cted => OneToOneFKToUniqueKeyDependent.cs} | 0 ...cted => OneToOneFKToUniqueKeyPrincipal.cs} | 0 ...rincipal.expected => OneToOnePrincipal.cs} | 0 ...xpected => OneToOneSeparateFKDependent.cs} | 0 ...xpected => OneToOneSeparateFKPrincipal.cs} | 0 ...tion.expected => PropertyConfiguration.cs} | 0 ...eferencing.expected => SelfReferencing.cs} | 0 ...SqlServerReverseEngineerTestE2EContext.cs} | 0 ...le.expected => TestSpacesKeywordsTable.cs} | 0 ...KColumn.expected => UnmappablePKColumn.cs} | 0 ...{AllDataTypes.expected => AllDataTypes.cs} | 0 ...sContext.expected => AttributesContext.cs} | 0 ...ndent.expected => MultipleFKsDependent.cs} | 0 ...cipal.expected => MultipleFKsPrincipal.cs} | 0 ...pendent.expected => OneToManyDependent.cs} | 0 ...incipal.expected => OneToManyPrincipal.cs} | 0 ...ependent.expected => OneToOneDependent.cs} | 0 ...cted => OneToOneFKToUniqueKeyDependent.cs} | 0 ...cted => OneToOneFKToUniqueKeyPrincipal.cs} | 0 ...rincipal.expected => OneToOnePrincipal.cs} | 0 ...xpected => OneToOneSeparateFKDependent.cs} | 0 ...xpected => OneToOneSeparateFKPrincipal.cs} | 0 ...tion.expected => PropertyConfiguration.cs} | 0 ...eferencing.expected => SelfReferencing.cs} | 0 ...le.expected => TestSpacesKeywordsTable.cs} | 0 ...KColumn.expected => UnmappablePKColumn.cs} | 0 ...ilteredIndex.expected => FilteredIndex.cs} | 0 ...ntext.expected => FilteredIndexContext.cs} | 0 ...nce.expected => PrimaryKeyWithSequence.cs} | 0 ...ected => PrimaryKeyWithSequenceContext.cs} | 0 ...nceContext.expected => SequenceContext.cs} | 0 ...mVersioned.expected => SystemVersioned.cs} | 0 ...ext.expected => SystemVersionedContext.cs} | 0 .../ReverseEngineering/SqlServerE2ETests.cs | 48 +++++++++---------- ...FCore.Sqlite.Design.FunctionalTests.csproj | 6 ++- .../{Comment.expected => Comment.cs} | 0 ...yContext.expected => FkToAltKeyContext.cs} | 0 .../FkToAltKey/{User.expected => User.cs} | 0 .../ManyToMany/{Groups.expected => Groups.cs} | 0 ...expected => ManyToManyFluentApiContext.cs} | 0 .../ManyToMany/{Users.expected => Users.cs} | 0 .../{UsersGroups.expected => UsersGroups.cs} | 0 .../{Dependent.expected => Dependent.cs} | 0 ...ected => NoPrincipalPkFluentApiContext.cs} | 0 ...pendent.expected => OneToManyDependent.cs} | 0 ....expected => OneToManyFluentApiContext.cs} | 0 ...incipal.expected => OneToManyPrincipal.cs} | 0 .../{Dependent.expected => Dependent.cs} | 0 ...t.expected => OneToOneFluentApiContext.cs} | 0 .../{Principal.expected => Principal.cs} | 0 .../SelfRef/{SelfRef.expected => SelfRef.cs} | 0 ...xt.expected => SelfRefFluentApiContext.cs} | 0 .../{Comment.expected => Comment.cs} | 0 ...yContext.expected => FkToAltKeyContext.cs} | 0 .../FkToAltKey/{User.expected => User.cs} | 0 .../ManyToMany/{Groups.expected => Groups.cs} | 0 ...xpected => ManyToManyAttributesContext.cs} | 0 .../ManyToMany/{Users.expected => Users.cs} | 0 .../{UsersGroups.expected => UsersGroups.cs} | 0 .../{Dependent.expected => Dependent.cs} | 0 ...cted => NoPrincipalPkAttributesContext.cs} | 0 ...expected => OneToManyAttributesContext.cs} | 0 ...pendent.expected => OneToManyDependent.cs} | 0 ...incipal.expected => OneToManyPrincipal.cs} | 0 .../{Dependent.expected => Dependent.cs} | 0 ....expected => OneToOneAttributesContext.cs} | 0 .../{Principal.expected => Principal.cs} | 0 .../SelfRef/{SelfRef.expected => SelfRef.cs} | 0 ...t.expected => SelfRefAttributesContext.cs} | 0 .../ReverseEngineering/SqliteE2ETestBase.cs | 34 ++++++------- 77 files changed, 51 insertions(+), 43 deletions(-) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{AllDataTypes.expected => AllDataTypes.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{MultipleFKsDependent.expected => MultipleFKsDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{MultipleFKsPrincipal.expected => MultipleFKsPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToManyDependent.expected => OneToManyDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToManyPrincipal.expected => OneToManyPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOneDependent.expected => OneToOneDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOneFKToUniqueKeyDependent.expected => OneToOneFKToUniqueKeyDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOneFKToUniqueKeyPrincipal.expected => OneToOneFKToUniqueKeyPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOnePrincipal.expected => OneToOnePrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOneSeparateFKDependent.expected => OneToOneSeparateFKDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{OneToOneSeparateFKPrincipal.expected => OneToOneSeparateFKPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{PropertyConfiguration.expected => PropertyConfiguration.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{SelfReferencing.expected => SelfReferencing.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{SqlServerReverseEngineerTestE2EContext.expected => SqlServerReverseEngineerTestE2EContext.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{TestSpacesKeywordsTable.expected => TestSpacesKeywordsTable.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/{UnmappablePKColumn.expected => UnmappablePKColumn.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{AllDataTypes.expected => AllDataTypes.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{AttributesContext.expected => AttributesContext.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{MultipleFKsDependent.expected => MultipleFKsDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{MultipleFKsPrincipal.expected => MultipleFKsPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToManyDependent.expected => OneToManyDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToManyPrincipal.expected => OneToManyPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOneDependent.expected => OneToOneDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOneFKToUniqueKeyDependent.expected => OneToOneFKToUniqueKeyDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOneFKToUniqueKeyPrincipal.expected => OneToOneFKToUniqueKeyPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOnePrincipal.expected => OneToOnePrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOneSeparateFKDependent.expected => OneToOneSeparateFKDependent.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{OneToOneSeparateFKPrincipal.expected => OneToOneSeparateFKPrincipal.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{PropertyConfiguration.expected => PropertyConfiguration.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{SelfReferencing.expected => SelfReferencing.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{TestSpacesKeywordsTable.expected => TestSpacesKeywordsTable.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/{UnmappablePKColumn.expected => UnmappablePKColumn.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{FilteredIndex.expected => FilteredIndex.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{FilteredIndexContext.expected => FilteredIndexContext.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{PrimaryKeyWithSequence.expected => PrimaryKeyWithSequence.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{PrimaryKeyWithSequenceContext.expected => PrimaryKeyWithSequenceContext.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{SequenceContext.expected => SequenceContext.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{SystemVersioned.expected => SystemVersioned.cs} (100%) rename test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/{SystemVersionedContext.expected => SystemVersionedContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/{Comment.expected => Comment.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/{FkToAltKeyContext.expected => FkToAltKeyContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/{User.expected => User.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/{Groups.expected => Groups.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/{ManyToManyFluentApiContext.expected => ManyToManyFluentApiContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/{Users.expected => Users.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/{UsersGroups.expected => UsersGroups.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/{Dependent.expected => Dependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/{NoPrincipalPkFluentApiContext.expected => NoPrincipalPkFluentApiContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/{OneToManyDependent.expected => OneToManyDependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/{OneToManyFluentApiContext.expected => OneToManyFluentApiContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/{OneToManyPrincipal.expected => OneToManyPrincipal.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/{Dependent.expected => Dependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/{OneToOneFluentApiContext.expected => OneToOneFluentApiContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/{Principal.expected => Principal.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/{SelfRef.expected => SelfRef.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/{SelfRefFluentApiContext.expected => SelfRefFluentApiContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/{Comment.expected => Comment.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/{FkToAltKeyContext.expected => FkToAltKeyContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/{User.expected => User.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/{Groups.expected => Groups.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/{ManyToManyAttributesContext.expected => ManyToManyAttributesContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/{Users.expected => Users.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/{UsersGroups.expected => UsersGroups.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/{Dependent.expected => Dependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/{NoPrincipalPkAttributesContext.expected => NoPrincipalPkAttributesContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/{OneToManyAttributesContext.expected => OneToManyAttributesContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/{OneToManyDependent.expected => OneToManyDependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/{OneToManyPrincipal.expected => OneToManyPrincipal.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/{Dependent.expected => Dependent.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/{OneToOneAttributesContext.expected => OneToOneAttributesContext.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/{Principal.expected => Principal.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/{SelfRef.expected => SelfRef.cs} (100%) rename test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/{SelfRefAttributesContext.expected => SelfRefAttributesContext.cs} (100%) diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj b/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj index a724504fe4d..57a9108b7f4 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj +++ b/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj @@ -11,7 +11,11 @@ - + + + + + PreserveNewest diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/AllDataTypes.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/MultipleFKsPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToManyPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneFKToUniqueKeyPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOnePrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOnePrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOnePrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOnePrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOneSeparateFKPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/PropertyConfiguration.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/PropertyConfiguration.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/PropertyConfiguration.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/PropertyConfiguration.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfReferencing.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/TestSpacesKeywordsTable.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/TestSpacesKeywordsTable.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/TestSpacesKeywordsTable.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/TestSpacesKeywordsTable.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/UnmappablePKColumn.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/UnmappablePKColumn.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/UnmappablePKColumn.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/UnmappablePKColumn.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndex.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndex.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndex.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndex.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/FilteredIndexContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequence.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequence.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequence.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequence.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequenceContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequenceContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequenceContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/PrimaryKeyWithSequenceContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SequenceContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SequenceContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SequenceContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SequenceContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersioned.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersioned.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersioned.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersioned.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersionedContext.expected b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersionedContext.cs similarity index 100% rename from test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersionedContext.expected rename to test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/SystemVersionedContext.cs diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index 72919f6e33b..d8df4dc130d 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -63,21 +63,21 @@ public SqlServerE2ETests(SqlServerE2EFixture fixture, ITestOutputHelper output) private static readonly List _expectedEntityTypeFiles = new List { - "AllDataTypes.expected", - "MultipleFKsDependent.expected", - "MultipleFKsPrincipal.expected", - "OneToManyDependent.expected", - "OneToManyPrincipal.expected", - "OneToOneDependent.expected", - "OneToOneFKToUniqueKeyDependent.expected", - "OneToOneFKToUniqueKeyPrincipal.expected", - "OneToOnePrincipal.expected", - "OneToOneSeparateFKDependent.expected", - "OneToOneSeparateFKPrincipal.expected", - "PropertyConfiguration.expected", - "SelfReferencing.expected", - "TestSpacesKeywordsTable.expected", - "UnmappablePKColumn.expected" + "AllDataTypes.cs", + "MultipleFKsDependent.cs", + "MultipleFKsPrincipal.cs", + "OneToManyDependent.cs", + "OneToManyPrincipal.cs", + "OneToOneDependent.cs", + "OneToOneFKToUniqueKeyDependent.cs", + "OneToOneFKToUniqueKeyPrincipal.cs", + "OneToOnePrincipal.cs", + "OneToOneSeparateFKDependent.cs", + "OneToOneSeparateFKPrincipal.cs", + "PropertyConfiguration.cs", + "SelfReferencing.cs", + "TestSpacesKeywordsTable.cs", + "UnmappablePKColumn.cs" }; [Fact] @@ -106,7 +106,7 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() contents => contents.Replace("namespace " + TestNamespace, "namespace " + TestNamespace + "." + TestSubDir) .Replace("{{connectionString}}", _connectionString)) { - Files = new List { "AttributesContext.expected" } + Files = new List { "AttributesContext.cs" } .Concat(_expectedEntityTypeFiles).ToList() }; @@ -157,7 +157,7 @@ public void E2ETest_AllFluentApi() Path.Combine("ReverseEngineering", "Expected", "AllFluentApi"), inputFile => inputFile.Replace("{{connectionString}}", _connectionString)) { - Files = new List { "SqlServerReverseEngineerTestE2EContext.expected" } + Files = new List { "SqlServerReverseEngineerTestE2EContext.cs" } .Concat(_expectedEntityTypeFiles).ToList() }; @@ -225,7 +225,7 @@ CREATE SEQUENCE NumericSequence Path.Combine("ReverseEngineering", "Expected"), contents => contents.Replace("{{connectionString}}", scratch.ConnectionString)) { - Files = new List { "SequenceContext.expected" } + Files = new List { "SequenceContext.cs" } }; var filePaths = Generator.GenerateAsync( @@ -283,8 +283,8 @@ PRIMARY KEY (PrimaryKeyWithSequenceId) { Files = new List { - "PrimaryKeyWithSequenceContext.expected", - "PrimaryKeyWithSequence.expected" + "PrimaryKeyWithSequenceContext.cs", + "PrimaryKeyWithSequence.cs" } }; @@ -333,8 +333,8 @@ ON FilteredIndex (Number) WHERE Number > 10 { Files = new List { - "FilteredIndexContext.expected", - "FilteredIndex.expected", + "FilteredIndexContext.cs", + "FilteredIndex.cs", } }; @@ -384,8 +384,8 @@ PERIOD FOR SYSTEM_TIME(SysStartTime, SysEndTime) { Files = new List { - "SystemVersionedContext.expected", - "SystemVersioned.expected", + "SystemVersionedContext.cs", + "SystemVersioned.cs", } }; diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj b/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj index cad64a1c904..6da0209476d 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj +++ b/test/EFCore.Sqlite.Design.FunctionalTests/EFCore.Sqlite.Design.FunctionalTests.csproj @@ -11,7 +11,11 @@ - + + + + + PreserveNewest diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/Comment.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/Comment.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/Comment.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/Comment.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/User.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/User.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/User.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/User.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Groups.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Groups.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Groups.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Groups.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Users.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Users.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Users.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/Users.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/UsersGroups.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/UsersGroups.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/UsersGroups.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/UsersGroups.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/Dependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/Dependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/Dependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/Dependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyDependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyDependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyDependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyDependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyFluentApiContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyFluentApiContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyFluentApiContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyFluentApiContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyPrincipal.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyPrincipal.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyPrincipal.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToMany/OneToManyPrincipal.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Dependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Dependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Dependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Dependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Principal.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Principal.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Principal.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/Principal.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRef.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/Comment.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/Comment.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/Comment.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/Comment.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/User.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/User.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/User.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/User.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Groups.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Groups.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Groups.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Groups.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Users.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Users.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Users.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/Users.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/UsersGroups.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/UsersGroups.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/UsersGroups.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/UsersGroups.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/Dependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/Dependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/Dependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/Dependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyAttributesContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyAttributesContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyAttributesContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyDependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyDependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyDependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyDependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyPrincipal.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyPrincipal.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyPrincipal.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToMany/OneToManyPrincipal.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Dependent.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Dependent.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Dependent.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Dependent.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Principal.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Principal.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Principal.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/Principal.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRef.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs similarity index 100% rename from test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.expected rename to test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs index bf538fd9deb..bbefb72fe89 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs @@ -59,9 +59,9 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal (Id) { Files = { - "OneToOne" + DbSuffix + "Context.expected", - "Dependent.expected", - "Principal.expected" + "OneToOne" + DbSuffix + "Context.cs", + "Dependent.cs", + "Principal.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) @@ -113,9 +113,9 @@ REFERENCES OneToManyPrincipal ( OneToManyPrincipalID1, OneToManyPrincipalID2 ) { Files = { - "OneToMany" + DbSuffix + "Context.expected", - "OneToManyDependent.expected", - "OneToManyPrincipal.expected" + "OneToMany" + DbSuffix + "Context.cs", + "OneToManyDependent.cs", + "OneToManyPrincipal.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) @@ -161,10 +161,10 @@ FOREIGN KEY (GroupId) REFERENCES Groups (Id) { Files = { - "ManyToMany" + DbSuffix + "Context.expected", - "Groups.expected", - "Users.expected", - "UsersGroups.expected" + "ManyToMany" + DbSuffix + "Context.cs", + "Groups.cs", + "Users.cs", + "UsersGroups.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) @@ -203,8 +203,8 @@ FOREIGN KEY (SelfForeignKey) REFERENCES SelfRef (Id) { Files = { - "SelfRef" + DbSuffix + "Context.expected", - "SelfRef.expected" + "SelfRef" + DbSuffix + "Context.cs", + "SelfRef.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) @@ -284,8 +284,8 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal(Id) { Files = { - "NoPrincipalPk" + DbSuffix + "Context.expected", - "Dependent.expected" + "NoPrincipalPk" + DbSuffix + "Context.cs", + "Dependent.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) @@ -380,9 +380,9 @@ FOREIGN KEY (UserAltId) REFERENCES User (AltId) { Files = { - "FkToAltKeyContext.expected", - "Comment.expected", - "User.expected" + "FkToAltKeyContext.cs", + "Comment.cs", + "User.cs" } }; var actualFileSet = new FileSet(InMemoryFiles, TestProjectFullPath) From 32434d2d86a75e091e331940384115e447ff33de Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 1 Jun 2017 13:29:36 -0700 Subject: [PATCH 10/11] Remove SqlServer.Design Remove SqlServer.Design.Tests Introduce IAnnotationRenderer interface for provider writers to provide us how to interpret annotations Flow annotations from DatabaseModel to IModel so that provider can generate provider specific fluent API Remove special processing inside of SqlServerScaffoldingFactory. All processing should happen while generating database --- EFCore.sln | 14 - .../Internal/CSharpDbContextGenerator.cs | 212 +++ .../RelationalScaffoldingModelFactory.cs | 37 +- .../breakingchanges.netcore.json | 5 + .../Design/AnnotationRendererBase.cs | 108 ++ .../Design/IAnnotationRenderer.cs | 26 + .../Diagnostics/SqlServerDesignEventId.cs | 67 - .../EFCore.SqlServer.Design.csproj | 53 - .../SqlServerScaffoldingModelFactory.cs | 181 --- .../Properties/InternalsVisibleTo.cs | 10 - .../SqlServerDesignStrings.Designer.cs | 86 - .../SqlServerDesignStrings.Designer.tt | 4 - .../Properties/SqlServerDesignStrings.resx | 140 -- .../baseline.netcore.json | 1390 ----------------- .../breakingchanges.netcore.json | 6 - .../Internal/SqlServerAnnotationRenderer.cs | 61 + .../Internal/SqlServerDesignTimeServices.cs | 9 +- .../Diagnostics/SqlServerEventId.cs | 41 +- .../Internal/SqlServerLoggerExtensions.cs} | 89 +- .../Properties/AssemblyInfo.cs | 6 +- .../Properties/SqlServerStrings.Designer.cs | 54 + .../Properties/SqlServerStrings.resx | 20 + .../Internal/SqlDataReaderExtension.cs | 0 .../Internal/SqlServerDatabaseModelFactory.cs | 31 +- .../SqlServerTableSelectionSetExtensions.cs | 0 .../Internal/SqlServerLoggerExtensions.cs | 89 -- .../Internal/SqliteDesignTimeServices.cs | 3 +- .../ReverseEngineeringConfigurationTests.cs | 68 +- ...re.SqlServer.Design.FunctionalTests.csproj | 1 - .../ReverseEngineering/E2E.sql | 4 +- .../SqlServerReverseEngineerTestE2EContext.cs | 3 +- .../Expected/Attributes/AllDataTypes.cs | 2 +- .../Expected/Attributes/AttributesContext.cs | 5 +- .../Attributes/MultipleFKsDependent.cs | 2 +- .../Attributes/MultipleFKsPrincipal.cs | 2 +- .../Expected/Attributes/OneToManyDependent.cs | 2 +- .../Expected/Attributes/OneToManyPrincipal.cs | 2 +- .../Expected/Attributes/OneToOneDependent.cs | 2 +- .../OneToOneFKToUniqueKeyDependent.cs | 2 +- .../OneToOneFKToUniqueKeyPrincipal.cs | 2 +- .../Expected/Attributes/OneToOnePrincipal.cs | 2 +- .../Attributes/OneToOneSeparateFKDependent.cs | 2 +- .../Attributes/OneToOneSeparateFKPrincipal.cs | 2 +- .../Attributes/PropertyConfiguration.cs | 2 +- .../Expected/Attributes/SelfReferencing.cs | 2 +- .../Attributes/TestSpacesKeywordsTable.cs | 2 +- .../Expected/Attributes/UnmappablePKColumn.cs | 2 +- .../ReverseEngineering/SqlServerE2ETests.cs | 4 +- .../SqlServerDatabaseModelFactoryTest.cs | 7 +- .../ApiConsistencyTest.cs | 13 - .../EFCore.SqlServer.Design.Tests.csproj | 36 - .../SqlServerDesignEventIdTest.cs | 29 - .../EFCore.SqlServer.FunctionalTests.csproj | 1 - ...SqlServerDesignTimeProviderServicesTest.cs | 1 + .../ScaffoldingTypeMapperSqlServerTest.cs | 0 ...lServerTableSelectionSetExtensionsTests.cs | 0 .../SqlServerEventIdTest.cs | 3 +- .../FkToAltKey/FkToAltKeyContext.cs | 4 + .../ManyToMany/ManyToManyFluentApiContext.cs | 12 + .../NoPrincipalPkFluentApiContext.cs | 2 + .../OneToOne/OneToOneFluentApiContext.cs | 9 +- .../SelfRef/SelfRefFluentApiContext.cs | 2 + .../FkToAltKey/FkToAltKeyContext.cs | 4 + .../ManyToMany/ManyToManyAttributesContext.cs | 12 + .../NoPrincipalPkAttributesContext.cs | 7 +- .../OneToOne/OneToOneAttributesContext.cs | 7 + .../SelfRef/SelfRefAttributesContext.cs | 7 +- .../ScaffoldingTypeMapperSqliteTest.cs | 0 .../SqliteTableSelectionSetExtensionsTests.cs | 0 69 files changed, 834 insertions(+), 2179 deletions(-) create mode 100644 src/EFCore.Relational/Design/AnnotationRendererBase.cs create mode 100644 src/EFCore.Relational/Design/IAnnotationRenderer.cs delete mode 100644 src/EFCore.SqlServer.Design/Diagnostics/SqlServerDesignEventId.cs delete mode 100644 src/EFCore.SqlServer.Design/EFCore.SqlServer.Design.csproj delete mode 100644 src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs delete mode 100644 src/EFCore.SqlServer.Design/Properties/InternalsVisibleTo.cs delete mode 100644 src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.cs delete mode 100644 src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.tt delete mode 100644 src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.resx delete mode 100644 src/EFCore.SqlServer.Design/baseline.netcore.json delete mode 100644 src/EFCore.SqlServer.Design/breakingchanges.netcore.json create mode 100644 src/EFCore.SqlServer/Design/Internal/SqlServerAnnotationRenderer.cs rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Design}/Internal/SqlServerDesignTimeServices.cs (82%) rename src/{EFCore.SqlServer.Design/Internal/SqlServerDesignLoggerExtensions.cs => EFCore.SqlServer/Internal/SqlServerLoggerExtensions.cs} (68%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Internal/SqlDataReaderExtension.cs (100%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Internal/SqlServerDatabaseModelFactory.cs (97%) rename src/{EFCore.SqlServer.Design => EFCore.SqlServer/Scaffolding}/Internal/SqlServerTableSelectionSetExtensions.cs (100%) delete mode 100644 src/EFCore.SqlServer/Storage/Internal/SqlServerLoggerExtensions.cs delete mode 100644 test/EFCore.SqlServer.Design.Tests/ApiConsistencyTest.cs delete mode 100644 test/EFCore.SqlServer.Design.Tests/EFCore.SqlServer.Design.Tests.csproj delete mode 100644 test/EFCore.SqlServer.Design.Tests/SqlServerDesignEventIdTest.cs rename test/{EFCore.SqlServer.Design.Tests => EFCore.SqlServer.Tests/Design}/SqlServerDesignTimeProviderServicesTest.cs (93%) rename test/{EFCore.SqlServer.Design.Tests => EFCore.SqlServer.Tests/Scaffolding}/ScaffoldingTypeMapperSqlServerTest.cs (100%) rename test/{EFCore.SqlServer.Design.Tests => EFCore.SqlServer.Tests/Scaffolding}/SqlServerTableSelectionSetExtensionsTests.cs (100%) rename test/EFCore.Sqlite.Tests/{Design => Scaffolding}/ScaffoldingTypeMapperSqliteTest.cs (100%) rename test/EFCore.Sqlite.Tests/{Design => Scaffolding}/SqliteTableSelectionSetExtensionsTests.cs (100%) diff --git a/EFCore.sln b/EFCore.sln index 08aa2ab2838..e85efa72e63 100644 --- a/EFCore.sln +++ b/EFCore.sln @@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational", "src\EF EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Core", "src\EFCore.Sqlite.Core\EFCore.Sqlite.Core.csproj", "{A257C01B-BB91-44BA-831C-1E04F7800AC8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Design", "src\EFCore.SqlServer.Design\EFCore.SqlServer.Design.csproj", "{DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Design", "src\EFCore.Relational.Design\EFCore.Relational.Design.csproj", "{1942C281-C12B-4818-8CC8-C42842871FF5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer", "src\EFCore.SqlServer\EFCore.SqlServer.csproj", "{99595B81-D47C-40BA-8C61-5328A5A0E4AB}" @@ -39,8 +37,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Tests", "test EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Design.FunctionalTests", "test\EFCore.SqlServer.Design.FunctionalTests\EFCore.SqlServer.Design.FunctionalTests.csproj", "{15033D6B-D415-4932-9462-F2A5AE0B75E8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Design.Tests", "test\EFCore.SqlServer.Design.Tests\EFCore.SqlServer.Design.Tests.csproj", "{C56644A1-114D-4401-AC79-4B9EC4EDD1E3}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.FunctionalTests", "test\EFCore.SqlServer.FunctionalTests\EFCore.SqlServer.FunctionalTests.csproj", "{87AB43B7-767B-467B-9AA9-47BADF850D6A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer.Tests", "test\EFCore.SqlServer.Tests\EFCore.SqlServer.Tests.csproj", "{7D1C4E40-0DE6-4C50-AB84-CA8647EA92DF}" @@ -103,10 +99,6 @@ Global {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Release|Any CPU.Build.0 = Release|Any CPU - {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA}.Release|Any CPU.Build.0 = Release|Any CPU {1942C281-C12B-4818-8CC8-C42842871FF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1942C281-C12B-4818-8CC8-C42842871FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU {1942C281-C12B-4818-8CC8-C42842871FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -151,10 +143,6 @@ Global {15033D6B-D415-4932-9462-F2A5AE0B75E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {15033D6B-D415-4932-9462-F2A5AE0B75E8}.Release|Any CPU.ActiveCfg = Release|Any CPU {15033D6B-D415-4932-9462-F2A5AE0B75E8}.Release|Any CPU.Build.0 = Release|Any CPU - {C56644A1-114D-4401-AC79-4B9EC4EDD1E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C56644A1-114D-4401-AC79-4B9EC4EDD1E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C56644A1-114D-4401-AC79-4B9EC4EDD1E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C56644A1-114D-4401-AC79-4B9EC4EDD1E3}.Release|Any CPU.Build.0 = Release|Any CPU {87AB43B7-767B-467B-9AA9-47BADF850D6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87AB43B7-767B-467B-9AA9-47BADF850D6A}.Debug|Any CPU.Build.0 = Debug|Any CPU {87AB43B7-767B-467B-9AA9-47BADF850D6A}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -244,7 +232,6 @@ Global {6B102CC4-4396-4A7B-9F72-2C6B5C4D8310} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {6A25DF99-2615-46D8-9532-821764647EE1} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {A257C01B-BB91-44BA-831C-1E04F7800AC8} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} - {DA30FC85-8D88-4BB2-98CE-B8A5845BB3EA} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {1942C281-C12B-4818-8CC8-C42842871FF5} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {99595B81-D47C-40BA-8C61-5328A5A0E4AB} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0} = {258D5057-81B9-40EC-A872-D21E27452749} @@ -256,7 +243,6 @@ Global {7BB7D051-56D7-4A40-A29E-3801F5C19239} = {258D5057-81B9-40EC-A872-D21E27452749} {7E436D99-82A6-496C-A725-0819CBED056D} = {258D5057-81B9-40EC-A872-D21E27452749} {15033D6B-D415-4932-9462-F2A5AE0B75E8} = {258D5057-81B9-40EC-A872-D21E27452749} - {C56644A1-114D-4401-AC79-4B9EC4EDD1E3} = {258D5057-81B9-40EC-A872-D21E27452749} {87AB43B7-767B-467B-9AA9-47BADF850D6A} = {258D5057-81B9-40EC-A872-D21E27452749} {7D1C4E40-0DE6-4C50-AB84-CA8647EA92DF} = {258D5057-81B9-40EC-A872-D21E27452749} {313F46FE-9962-4A15-805F-FCBDF5A6181E} = {258D5057-81B9-40EC-A872-D21E27452749} diff --git a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs index 8db2502e8dc..9537c9edff8 100644 --- a/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs +++ b/src/EFCore.Design/Scaffolding/Internal/CSharpDbContextGenerator.cs @@ -5,11 +5,14 @@ using System.Collections.Generic; using System.Linq; using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; using Microsoft.EntityFrameworkCore.Utilities; namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal @@ -24,6 +27,7 @@ public class CSharpDbContextGenerator private readonly CSharpUtilities _cSharpUtilities; private readonly IScaffoldingHelper _scaffoldingHelper; + private readonly IAnnotationRenderer _annotationRenderer; private IndentedStringBuilder _sb; private bool _entityTypeBuilderInitialized; @@ -33,12 +37,15 @@ public class CSharpDbContextGenerator /// public CSharpDbContextGenerator( [NotNull] IScaffoldingHelper scaffoldingHelper, + [NotNull] IAnnotationRenderer annotationRenderer, [NotNull] CSharpUtilities cSharpUtilities) { Check.NotNull(scaffoldingHelper, nameof(scaffoldingHelper)); + Check.NotNull(annotationRenderer, nameof(annotationRenderer)); Check.NotNull(cSharpUtilities, nameof(cSharpUtilities)); _scaffoldingHelper = scaffoldingHelper; + _annotationRenderer = annotationRenderer; _cSharpUtilities = cSharpUtilities; } @@ -147,6 +154,55 @@ private void GenerateOnModelCreating(IModel model, bool useDataAnnotations) _sb.AppendLine("protected override void OnModelCreating(ModelBuilder modelBuilder)"); _sb.Append("{"); + var annotations = model.GetAnnotations().ToList(); + RemoveAnnotation(ref annotations, ScaffoldingAnnotationNames.DatabaseName); + RemoveAnnotation(ref annotations, ScaffoldingAnnotationNames.EntityTypeErrors); + + var annotationsToRemove = new List(); + annotationsToRemove.AddRange(annotations.Where(a => a.Name.StartsWith(RelationalAnnotationNames.SequencePrefix, StringComparison.Ordinal))); + + var lines = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(model, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(model, annotation); + + if (line != null) + { + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } + } + + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + + if (lines.Count > 0) + { + using (_sb.Indent()) + { + _sb.AppendLine(); + _sb.Append("modelBuilder" + lines[0]); + + using (_sb.Indent()) + { + foreach (var line in lines.Skip(1)) + { + _sb.AppendLine(); + _sb.Append(line); + } + } + + _sb.AppendLine(";"); + } + } + using (_sb.Indent()) { foreach (var entityType in model.GetEntityTypes()) @@ -186,11 +242,41 @@ private void GenerateEntityType(IEntityType entityType, bool useDataAnnotations) { GenerateKey(entityType.FindPrimaryKey(), useDataAnnotations); + var annotations = entityType.GetAnnotations().ToList(); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.TableName); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.Schema); + RemoveAnnotation(ref annotations, ScaffoldingAnnotationNames.DbSetName); + if (!useDataAnnotations) { GenerateTableName(entityType); } + var annotationsToRemove = new List(); + var lines = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(entityType, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(entityType, annotation); + + if (line != null) + { + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } + } + + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + + AppendMultiLineFluentApi(entityType, lines); + foreach (var index in entityType.GetIndexes()) { GenerateIndex(index); @@ -242,7 +328,10 @@ private void GenerateKey(IKey key, bool useDataAnnotations) return; } + var annotations = key.GetAnnotations().ToList(); + var explicitName = key.Relational().Name != new RelationalKeyAnnotations(key).GetDefaultName(); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.Name); if (key.Properties.Count == 1) { @@ -271,6 +360,28 @@ private void GenerateKey(IKey key, bool useDataAnnotations) lines.Add($".{nameof(RelationalKeyBuilderExtensions.HasName)}({_cSharpUtilities.DelimitString(key.Relational().Name)})"); } + var annotationsToRemove = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(key, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(key, annotation); + + if (line != null) + { + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } + } + + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + AppendMultiLineFluentApi(key.DeclaringEntityType, lines); } @@ -307,9 +418,12 @@ private void GenerateIndex(IIndex index) $".{nameof(EntityTypeBuilder.HasIndex)}(e => {GenerateLambdaToKey(index.Properties, "e")})" }; + var annotations = index.GetAnnotations().ToList(); + if (!string.IsNullOrEmpty(index.Relational().Name)) { lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasName)}({_cSharpUtilities.DelimitString(index.Relational().Name)})"); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.Name); } if (index.IsUnique) @@ -320,8 +434,31 @@ private void GenerateIndex(IIndex index) if (index.Relational().Filter != null) { lines.Add($".{nameof(RelationalIndexBuilderExtensions.HasFilter)}({_cSharpUtilities.DelimitString(index.Relational().Filter)})"); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.Filter); + } + + var annotationsToRemove = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(index, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(index, annotation); + + if (line != null) + { + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } } + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + AppendMultiLineFluentApi(index.DeclaringEntityType, lines); } @@ -332,6 +469,17 @@ private void GenerateProperty(IProperty property, bool useDataAnnotations) $".{nameof(EntityTypeBuilder.Property)}(e => e.{property.Name})" }; + var annotations = property.GetAnnotations().ToList(); + + RemoveAnnotation(ref annotations, RelationalAnnotationNames.ColumnName); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.ColumnType); + RemoveAnnotation(ref annotations, CoreAnnotationNames.MaxLengthAnnotation); + RemoveAnnotation(ref annotations, CoreAnnotationNames.UnicodeAnnotation); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.DefaultValue); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.DefaultValueSql); + RemoveAnnotation(ref annotations, RelationalAnnotationNames.ComputedColumnSql); + RemoveAnnotation(ref annotations, ScaffoldingAnnotationNames.ColumnOrdinal); + if (!useDataAnnotations) { if (!property.IsNullable @@ -411,6 +559,28 @@ private void GenerateProperty(IProperty property, bool useDataAnnotations) lines.Add($".{methodName}()"); } + var annotationsToRemove = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(property, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(property, annotation); + + if (line != null) + { + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } + } + + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + switch (lines.Count) { case 1: @@ -429,6 +599,8 @@ private void GenerateProperty(IProperty property, bool useDataAnnotations) private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotations) { var canUseDataAnnotations = true; + var annotations = foreignKey.GetAnnotations().ToList(); + var lines = new List { $".{nameof(EntityTypeBuilder.HasOne)}(d => d.{foreignKey.DependentToPrincipal.Name})", @@ -458,6 +630,8 @@ private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotation lines.Add($".{nameof(ReferenceReferenceBuilder.OnDelete)}({_cSharpUtilities.GenerateLiteral(foreignKey.DeleteBehavior)})"); } + RemoveAnnotation(ref annotations, RelationalAnnotationNames.Name); + if (foreignKey.Relational().Name != RelationalForeignKeyAnnotations.GetDefaultForeignKeyName( foreignKey.DeclaringEntityType.Relational().TableName, @@ -468,6 +642,29 @@ private void GenerateRelationship(IForeignKey foreignKey, bool useDataAnnotation lines.Add($".{nameof(RelationalReferenceReferenceBuilderExtensions.HasConstraintName)}({_cSharpUtilities.DelimitString(foreignKey.Relational().Name)})"); } + var annotationsToRemove = new List(); + + foreach (var annotation in annotations) + { + if (_annotationRenderer.IsHandledByConvention(foreignKey, annotation)) + { + annotationsToRemove.Add(annotation); + } + else + { + var line = _annotationRenderer.GenerateFluentApi(foreignKey, annotation); + + if (line != null) + { + canUseDataAnnotations = false; + lines.Add(line); + annotationsToRemove.Add(annotation); + } + } + } + + lines.AddRange(GenerateAnnotations(annotations.Except(annotationsToRemove))); + if (!useDataAnnotations || !canUseDataAnnotations) { AppendMultiLineFluentApi(foreignKey.DeclaringEntityType, lines); @@ -557,5 +754,20 @@ private string GenerateLambdaToKey( ? $"{lambdaIdentifier}.{properties[0].Name}" : $"new {{ {string.Join(", ", properties.Select(p => lambdaIdentifier + "." + p.Name))} }}"; } + + private void RemoveAnnotation(ref List annotations, string annotationName) + { + annotations.Remove(annotations.SingleOrDefault(a => a.Name == annotationName)); + } + + private IList GenerateAnnotations(IEnumerable annotations) + { + return annotations.Select(GenerateAnnotation).ToList(); + } + + private string GenerateAnnotation(IAnnotation annotation) + { + return $".HasAnnotation({_cSharpUtilities.DelimitString(annotation.Name)}, {_cSharpUtilities.GenerateLiteral((dynamic)annotation.Value)})"; + } } } diff --git a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs index 0d807a3b83a..7b41f963303 100644 --- a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs +++ b/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs @@ -12,6 +12,7 @@ using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Conventions; +using Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal; using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; @@ -148,6 +149,8 @@ protected virtual ModelBuilder VisitDatabaseModel([NotNull] ModelBuilder modelBu VisitTables(modelBuilder, databaseModel.Tables); VisitForeignKeys(modelBuilder, databaseModel.Tables.SelectMany(table => table.ForeignKeys).ToList()); + modelBuilder.Model.AddAnnotations(databaseModel.GetAnnotations()); + return modelBuilder; } @@ -264,6 +267,8 @@ protected virtual EntityTypeBuilder VisitTable([NotNull] ModelBuilder modelBuild VisitIndexes(builder, table.Indexes); + builder.Metadata.AddAnnotations(table.GetAnnotations()); + return builder; } @@ -350,14 +355,10 @@ protected virtual PropertyBuilder VisitColumn([NotNull] EntityTypeBuilder builde } property.Metadata.Scaffolding().ColumnOrdinal = column.Ordinal; - return property; - } - protected virtual RelationalTypeMapping GetTypeMapping([NotNull] ColumnModel column) - { - Check.NotNull(column, nameof(column)); + property.Metadata.AddAnnotations(column.GetAnnotations()); - return column.StoreType == null ? null : TypeMapper.FindMapping(column.StoreType); + return property; } protected virtual KeyBuilder VisitPrimaryKey([NotNull] EntityTypeBuilder builder, [NotNull] TableModel table) @@ -386,7 +387,25 @@ protected virtual KeyBuilder VisitPrimaryKey([NotNull] EntityTypeBuilder builder return null; } - return builder.HasKey(keyColumns.Select(GetPropertyName).ToArray()); + var keyBuilder = builder.HasKey(keyColumns.Select(GetPropertyName).ToArray()); + + var pkColumns = table.Columns.Where(c => c.PrimaryKeyOrdinal.HasValue).ToList(); + if (pkColumns.Count == 1 + && pkColumns[0].ValueGenerated == null + && pkColumns[0].DefaultValue == null) + { + var property = builder.Metadata.FindProperty(GetPropertyName(pkColumns[0]))?.AsProperty(); + if (property != null) + { + var conventionalValueGenerated = new RelationalValueGeneratorConvention().GetValueGenerated(property); + if (conventionalValueGenerated == ValueGenerated.OnAdd) + { + property.ValueGenerated = ValueGenerated.Never; + } + } + } + + return keyBuilder; } protected virtual EntityTypeBuilder VisitIndexes([NotNull] EntityTypeBuilder builder, [NotNull] ICollection indexes) @@ -458,6 +477,8 @@ protected virtual IndexBuilder VisitIndex([NotNull] EntityTypeBuilder builder, [ indexBuilder.HasName(index.Name); } + indexBuilder.Metadata.AddAnnotations(index.GetAnnotations()); + return indexBuilder; } @@ -597,6 +618,8 @@ protected virtual IMutableForeignKey VisitForeignKey([NotNull] ModelBuilder mode AssignOnDeleteAction(foreignKey, key); + key.AddAnnotations(foreignKey.GetAnnotations()); + return key; } diff --git a/src/EFCore.Relational.Design/breakingchanges.netcore.json b/src/EFCore.Relational.Design/breakingchanges.netcore.json index 9057122f0cd..7005832f914 100644 --- a/src/EFCore.Relational.Design/breakingchanges.netcore.json +++ b/src/EFCore.Relational.Design/breakingchanges.netcore.json @@ -64,5 +64,10 @@ { "TypeId": "public static class Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions", "Kind": "Removal" + }, + { + "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", + "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetTypeMapping(Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel column)", + "Kind": "Removal" } ] \ No newline at end of file diff --git a/src/EFCore.Relational/Design/AnnotationRendererBase.cs b/src/EFCore.Relational/Design/AnnotationRendererBase.cs new file mode 100644 index 00000000000..e9b262ed59d --- /dev/null +++ b/src/EFCore.Relational/Design/AnnotationRendererBase.cs @@ -0,0 +1,108 @@ +// 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.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Utilities; + +namespace Microsoft.EntityFrameworkCore.Design.Internal +{ + public class AnnotationRendererBase : IAnnotationRenderer + { + public virtual bool IsHandledByConvention(IModel model, IAnnotation annotation) + { + Check.NotNull(model, nameof(model)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual bool IsHandledByConvention(IEntityType entityType, IAnnotation annotation) + { + Check.NotNull(entityType, nameof(entityType)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual bool IsHandledByConvention(IKey key, IAnnotation annotation) + { + Check.NotNull(key, nameof(key)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual bool IsHandledByConvention(IProperty property, IAnnotation annotation) + { + Check.NotNull(property, nameof(property)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual bool IsHandledByConvention(IForeignKey foreignKey, IAnnotation annotation) + { + Check.NotNull(foreignKey, nameof(foreignKey)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual bool IsHandledByConvention(IIndex index, IAnnotation annotation) + { + Check.NotNull(index, nameof(index)); + Check.NotNull(annotation, nameof(annotation)); + + return false; + } + + public virtual string GenerateFluentApi(IModel model, IAnnotation annotation) + { + Check.NotNull(model, nameof(model)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + + public virtual string GenerateFluentApi(IEntityType entityType, IAnnotation annotation) + { + Check.NotNull(entityType, nameof(entityType)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + + public virtual string GenerateFluentApi(IKey key, IAnnotation annotation) + { + Check.NotNull(key, nameof(key)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + + public virtual string GenerateFluentApi(IProperty property, IAnnotation annotation) + { + Check.NotNull(property, nameof(property)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + + public virtual string GenerateFluentApi(IForeignKey foreignKey, IAnnotation annotation) + { + Check.NotNull(foreignKey, nameof(foreignKey)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + + public virtual string GenerateFluentApi(IIndex index, IAnnotation annotation) + { + Check.NotNull(index, nameof(index)); + Check.NotNull(annotation, nameof(annotation)); + + return null; + } + } +} diff --git a/src/EFCore.Relational/Design/IAnnotationRenderer.cs b/src/EFCore.Relational/Design/IAnnotationRenderer.cs new file mode 100644 index 00000000000..64431494931 --- /dev/null +++ b/src/EFCore.Relational/Design/IAnnotationRenderer.cs @@ -0,0 +1,26 @@ +// Copyright ([NotNull] c) .NET Foundation. All rights reserved. +// Licensed under the Apache License, [NotNull] Version 2.0. See License.txt in the project root for license information. + +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; + +namespace Microsoft.EntityFrameworkCore.Design +{ + public interface IAnnotationRenderer + { + bool IsHandledByConvention([NotNull] IModel model, [NotNull] IAnnotation annotation); + bool IsHandledByConvention([NotNull] IEntityType entityType, [NotNull] IAnnotation annotation); + bool IsHandledByConvention([NotNull] IKey key, [NotNull] IAnnotation annotation); + bool IsHandledByConvention([NotNull] IProperty property, [NotNull] IAnnotation annotation); + bool IsHandledByConvention([NotNull] IForeignKey foreignKey, [NotNull] IAnnotation annotation); + bool IsHandledByConvention([NotNull] IIndex index, [NotNull] IAnnotation annotation); + + string GenerateFluentApi([NotNull] IModel model, [NotNull] IAnnotation annotation); + string GenerateFluentApi([NotNull] IEntityType entityType, [NotNull] IAnnotation annotation); + string GenerateFluentApi([NotNull] IKey key, [NotNull] IAnnotation annotation); + string GenerateFluentApi([NotNull] IProperty property, [NotNull] IAnnotation annotation); + string GenerateFluentApi([NotNull] IForeignKey foreignKey, [NotNull] IAnnotation annotation); + string GenerateFluentApi([NotNull] IIndex index, [NotNull] IAnnotation annotation); + } +} diff --git a/src/EFCore.SqlServer.Design/Diagnostics/SqlServerDesignEventId.cs b/src/EFCore.SqlServer.Design/Diagnostics/SqlServerDesignEventId.cs deleted file mode 100644 index 63c0fb7e22a..00000000000 --- a/src/EFCore.SqlServer.Design/Diagnostics/SqlServerDesignEventId.cs +++ /dev/null @@ -1,67 +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 System.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Diagnostics -{ - /// - /// - /// Event IDs for relational design events that correspond to messages logged to an - /// and events sent to a . - /// - /// - /// These IDs are also used with to configure the - /// behavior of warnings. - /// - /// - public static class SqlServerDesignEventId - { - // Warning: These values must not change between releases. - // Only add new values to the end of sections, never in the middle. - // Try to use naming and be consistent with existing names. - private enum Id - { - // Scaffolding events - ColumnFound = CoreEventId.ProviderDesignBaseId, - ForeignKeyColumnFound, - DefaultSchemaFound, - TypeAliasFound, - DataTypeDoesNotAllowSqlServerIdentityStrategyWarning - } - - private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; - private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); - - /// - /// A column was found. - /// This event is in the category. - /// - public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); - - /// - /// A column of a foreign key was found. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyColumnFound = MakeScaffoldingId(Id.ForeignKeyColumnFound); - - /// - /// A default schema was found. - /// This event is in the category. - /// - public static readonly EventId DefaultSchemaFound = MakeScaffoldingId(Id.DefaultSchemaFound); - - /// - /// A type alias was found. - /// This event is in the category. - /// - public static readonly EventId TypeAliasFound = MakeScaffoldingId(Id.TypeAliasFound); - - /// - /// The data type does not support the SQL Server identity strategy. - /// This event is in the category. - /// - public static readonly EventId DataTypeDoesNotAllowSqlServerIdentityStrategyWarning = MakeScaffoldingId(Id.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning); - } -} diff --git a/src/EFCore.SqlServer.Design/EFCore.SqlServer.Design.csproj b/src/EFCore.SqlServer.Design/EFCore.SqlServer.Design.csproj deleted file mode 100644 index 8b00dee9cbe..00000000000 --- a/src/EFCore.SqlServer.Design/EFCore.SqlServer.Design.csproj +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Design-time Entity Framework Core Functionality for Microsoft SQL Server. - netstandard2.0 - Microsoft.EntityFrameworkCore.SqlServer.Design - Microsoft.EntityFrameworkCore - true - $(PackageTags);SQL Server - ..\EFCore.ruleset - - - - - - - - - - - - - - TextTemplatingFileGenerator - SqlServerDesignStrings.Designer.cs - - - - - - - - - - True - True - SqlServerDesignStrings.Designer.tt - - - - - - Microsoft.EntityFrameworkCore.Internal - - - - - - - - diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs b/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs deleted file mode 100644 index 92355d5c6bf..00000000000 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerScaffoldingModelFactory.cs +++ /dev/null @@ -1,181 +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 System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Builders; -using Microsoft.EntityFrameworkCore.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; -using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; -using Microsoft.EntityFrameworkCore.Storage; - -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public class SqlServerScaffoldingModelFactory : RelationalScaffoldingModelFactory - { - private const int DefaultTimeTimePrecision = 7; - - private static readonly ISet _stringAndByteArrayTypesForbiddingMaxLength = - new HashSet(StringComparer.OrdinalIgnoreCase) { "image", "ntext", "text", "rowversion", "timestamp" }; - - private static readonly ISet _dataTypesAllowingMaxLengthMax = - new HashSet(StringComparer.OrdinalIgnoreCase) { "varchar", "nvarchar", "varbinary" }; - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public SqlServerScaffoldingModelFactory( - [NotNull] IDiagnosticsLogger logger, - [NotNull] IRelationalTypeMapper typeMapper, - [NotNull] IDatabaseModelFactory databaseModelFactory, - [NotNull] CandidateNamingService candidateNamingService, - [NotNull] IPluralizer pluralizer, - [NotNull] IScaffoldingHelper scaffoldingHelper) - : base(logger, typeMapper, databaseModelFactory, candidateNamingService, pluralizer, scaffoldingHelper) - { - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected override PropertyBuilder VisitColumn(EntityTypeBuilder builder, ColumnModel column) - { - var propertyBuilder = base.VisitColumn(builder, column); - - if (propertyBuilder == null) - { - return null; - } - - VisitDefaultValue(propertyBuilder, column); - - VisitComputedValue(propertyBuilder, column); - - return propertyBuilder; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected override RelationalTypeMapping GetTypeMapping(ColumnModel column) - { - RelationalTypeMapping mapping = null; - if (column.StoreType != null) - { - string underlyingDataType = null; - column.Table.Database.SqlServer().TypeAliases?.TryGetValue( - SqlServerDatabaseModelFactory.SchemaQualifiedKey(column.StoreType, column.SqlServer().DataTypeSchemaName), out underlyingDataType); - - mapping = TypeMapper.FindMapping(underlyingDataType ?? column.StoreType); - } - - return mapping; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected override KeyBuilder VisitPrimaryKey(EntityTypeBuilder builder, TableModel table) - { - var keyBuilder = base.VisitPrimaryKey(builder, table); - - if (keyBuilder == null) - { - return null; - } - - // If this property is the single integer primary key on the EntityType then - // KeyConvention assumes ValueGeneratedOnAdd(). If the underlying column does - // not have Identity set then we need to set to ValueGeneratedNever() to - // override this behavior. - - // TODO use KeyConvention directly to detect when it will be applied - var pkColumns = table.Columns.Where(c => c.PrimaryKeyOrdinal.HasValue).ToList(); - if (pkColumns.Count != 1 - || pkColumns[0].ValueGenerated != null - || pkColumns[0].DefaultValue != null) - { - return keyBuilder; - } - - // TODO - var property = builder.Metadata.FindProperty(GetPropertyName(pkColumns[0])); - var propertyType = property?.ClrType?.UnwrapNullableType(); - - if (propertyType?.IsInteger() == true - || propertyType == typeof(Guid)) - { - property.ValueGenerated = ValueGenerated.Never; - } - - return keyBuilder; - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - protected override IndexBuilder VisitIndex(EntityTypeBuilder builder, IndexModel index) - { - var indexBuilder = base.VisitIndex(builder, index); - - if (index.SqlServer().IsClustered) - { - indexBuilder?.ForSqlServerIsClustered(); - } - - return indexBuilder; - } - - private void VisitDefaultValue(PropertyBuilder propertyBuilder, ColumnModel column) - { - if (column.DefaultValue != null) - { - propertyBuilder.Metadata.Relational().DefaultValueSql = null; - - if (!(column.DefaultValue == "(NULL)" - && propertyBuilder.Metadata.ClrType.IsNullableType())) - { - propertyBuilder.HasDefaultValueSql(column.DefaultValue); - } - else - { - ((Property)propertyBuilder.Metadata).SetValueGenerated(null, ConfigurationSource.Explicit); - } - } - } - - private void VisitComputedValue(PropertyBuilder propertyBuilder, ColumnModel column) - { - if (column.ComputedValue != null) - { - propertyBuilder.Metadata.Relational().ComputedColumnSql = null; - - if (!(column.ComputedValue == "(NULL)" - && propertyBuilder.Metadata.ClrType.IsNullableType())) - { - propertyBuilder.HasComputedColumnSql(column.ComputedValue); - } - else - { - ((Property)propertyBuilder.Metadata).SetValueGenerated(null, ConfigurationSource.Explicit); - } - } - } - } -} diff --git a/src/EFCore.SqlServer.Design/Properties/InternalsVisibleTo.cs b/src/EFCore.SqlServer.Design/Properties/InternalsVisibleTo.cs deleted file mode 100644 index f1c375c45fa..00000000000 --- a/src/EFCore.SqlServer.Design/Properties/InternalsVisibleTo.cs +++ /dev/null @@ -1,10 +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 System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.EntityFrameworkCore.SqlServer.Design.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] - -// for Moq - -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.cs b/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.cs deleted file mode 100644 index 7f9a8fcd89d..00000000000 --- a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.cs +++ /dev/null @@ -1,86 +0,0 @@ -// - -using System; -using System.Reflection; -using System.Resources; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class SqlServerDesignStrings - { - private static readonly ResourceManager _resourceManager - = new ResourceManager("Microsoft.EntityFrameworkCore.Properties.SqlServerDesignStrings", typeof(SqlServerDesignStrings).GetTypeInfo().Assembly); - - /// - /// For column {columnId}. This column is set up as an Identity column, but the SQL Server data type is {sqlServerDataType}. This will be mapped to CLR type byte which does not allow the SqlServerValueGenerationStrategy.IdentityColumn setting. Generating a matching Property but ignoring the Identity setting. - /// - public static readonly EventDefinition LogDataTypeDoesNotAllowSqlServerIdentityStrategy - = new EventDefinition( - SqlServerDesignEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - SqlServerDesignEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning, - _resourceManager.GetString("LogDataTypeDoesNotAllowSqlServerIdentityStrategy"))); - - /// - /// Found default schema {defaultSchema}. - /// - public static readonly EventDefinition LogFoundDefaultSchema - = new EventDefinition( - SqlServerDesignEventId.DefaultSchemaFound, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - SqlServerDesignEventId.DefaultSchemaFound, - _resourceManager.GetString("LogFoundDefaultSchema"))); - - /// - /// Found type alias with name: {alias} which maps to underlying data type {dataType}. - /// - public static readonly EventDefinition LogFoundTypeAlias - = new EventDefinition( - SqlServerDesignEventId.TypeAliasFound, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - SqlServerDesignEventId.TypeAliasFound, - _resourceManager.GetString("LogFoundTypeAlias"))); - - /// - /// Found column with table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, nullable: {isNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}, computed value: {computedValue}, precision: {precision}, scale: {scale}, maximum length: {maxLength}, identity: {isIdentity}, computed: {isComputed}. - /// - public static readonly FallbackEventDefinition LogFoundColumn - = new FallbackEventDefinition( - SqlServerDesignEventId.ColumnFound, - LogLevel.Debug, - _resourceManager.GetString("LogFoundColumn")); - - /// - /// Found foreign key column with table: {tableName}, foreign key name: {fkName}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, update action: {updateAction}, delete action: {deleteAction}, ordinal: {ordinal}. - /// - public static readonly FallbackEventDefinition LogFoundForeignKeyColumn - = new FallbackEventDefinition( - SqlServerDesignEventId.ForeignKeyColumnFound, - LogLevel.Debug, - _resourceManager.GetString("LogFoundForeignKeyColumn")); - - private static string GetString(string name, params string[] formatterNames) - { - var value = _resourceManager.GetString(name); - for (var i = 0; i < formatterNames.Length; i++) - { - value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); - } - - return value; - } - } -} diff --git a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.tt b/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.tt deleted file mode 100644 index 6bf529b8021..00000000000 --- a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.Designer.tt +++ /dev/null @@ -1,4 +0,0 @@ -<# - Session["ResourceFile"] = "SqlServerDesignStrings.resx"; -#> -<#@ include file="..\..\..\tools\Resources.tt" #> \ No newline at end of file diff --git a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.resx b/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.resx deleted file mode 100644 index 38eed11a7ec..00000000000 --- a/src/EFCore.SqlServer.Design/Properties/SqlServerDesignStrings.resx +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - For column {columnId}. This column is set up as an Identity column, but the SQL Server data type is {sqlServerDataType}. This will be mapped to CLR type byte which does not allow the SqlServerValueGenerationStrategy.IdentityColumn setting. Generating a matching Property but ignoring the Identity setting. - Warning SqlServerDesignEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning string string - - - Found default schema {defaultSchema}. - Debug SqlServerDesignEventId.DefaultSchemaFound string - - - Found type alias with name: {alias} which maps to underlying data type {dataType}. - Debug SqlServerDesignEventId.TypeAliasFound string string - - - Found column with table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, nullable: {isNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}, computed value: {computedValue}, precision: {precision}, scale: {scale}, maximum length: {maxLength}, identity: {isIdentity}, computed: {isComputed}. - Debug SqlServerDesignEventId.ColumnFound string string string int? bool? int? string string int? int? int? bool? bool? - - - Found foreign key column with table: {tableName}, foreign key name: {fkName}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, update action: {updateAction}, delete action: {deleteAction}, ordinal: {ordinal}. - Debug SqlServerDesignEventId.ForeignKeyColumnFound string string string string string string string int? - - \ No newline at end of file diff --git a/src/EFCore.SqlServer.Design/baseline.netcore.json b/src/EFCore.SqlServer.Design/baseline.netcore.json deleted file mode 100644 index 6930b094018..00000000000 --- a/src/EFCore.SqlServer.Design/baseline.netcore.json +++ /dev/null @@ -1,1390 +0,0 @@ -{ - "AssemblyIdentity": "Microsoft.EntityFrameworkCore.SqlServer.Design, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - "Types": [ - { - "Name": "Microsoft.EntityFrameworkCore.Internal.SqlServerDesignLoggerExtensions", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "LogWarning", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "LogDebug", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Internal.SqlServerDesignStrings", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "CannotInterpretComputedValue", - "Parameters": [ - { - "Name": "columnId", - "Type": "System.Object" - }, - { - "Name": "computedValue", - "Type": "System.Object" - }, - { - "Name": "propertyName", - "Type": "System.Object" - }, - { - "Name": "entityTypeName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "CannotInterpretDefaultValue", - "Parameters": [ - { - "Name": "columnId", - "Type": "System.Object" - }, - { - "Name": "defaultValue", - "Type": "System.Object" - }, - { - "Name": "propertyName", - "Type": "System.Object" - }, - { - "Name": "entityTypeName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ColumnNameEmptyOnForeignKey", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "fkName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ColumnNameEmptyOnIndex", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "indexName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ColumnNameEmptyOnTable", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ColumnNotInSelectionSet", - "Parameters": [ - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "DataTypeDoesNotAllowSqlServerIdentityStrategy", - "Parameters": [ - { - "Name": "columnId", - "Type": "System.Object" - }, - { - "Name": "sqlServerDataType", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyColumnNotInSelectionSet", - "Parameters": [ - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "fkName", - "Type": "System.Object" - }, - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyNameEmpty", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundColumn", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "dataType", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - }, - { - "Name": "isNullable", - "Type": "System.Object" - }, - { - "Name": "primaryKeyOrdinal", - "Type": "System.Object" - }, - { - "Name": "defaultValue", - "Type": "System.Object" - }, - { - "Name": "computedValue", - "Type": "System.Object" - }, - { - "Name": "precision", - "Type": "System.Object" - }, - { - "Name": "scale", - "Type": "System.Object" - }, - { - "Name": "maxLength", - "Type": "System.Object" - }, - { - "Name": "isIdentity", - "Type": "System.Object" - }, - { - "Name": "isComputed", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundDefaultSchema", - "Parameters": [ - { - "Name": "defaultSchema", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundForeignKeyColumn", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "fkName", - "Type": "System.Object" - }, - { - "Name": "principalTableSchema", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "principalColumnName", - "Type": "System.Object" - }, - { - "Name": "updateAction", - "Type": "System.Object" - }, - { - "Name": "deleteAction", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundIndexColumn", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "isUnique", - "Type": "System.Object" - }, - { - "Name": "typeDesc", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "ordinal", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundSequence", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "name", - "Type": "System.Object" - }, - { - "Name": "dataType", - "Type": "System.Object" - }, - { - "Name": "isCyclic", - "Type": "System.Object" - }, - { - "Name": "increment", - "Type": "System.Object" - }, - { - "Name": "start", - "Type": "System.Object" - }, - { - "Name": "min", - "Type": "System.Object" - }, - { - "Name": "max", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundTable", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "name", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FoundTypeAlias", - "Parameters": [ - { - "Name": "alias", - "Type": "System.Object" - }, - { - "Name": "dataType", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "IndexColumnNotInSelectionSet", - "Parameters": [ - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "IndexNameEmpty", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "PrincipalTableNotInSelectionSet", - "Parameters": [ - { - "Name": "fkName", - "Type": "System.Object" - }, - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "principalTableSchema", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "SequenceNameEmpty", - "Parameters": [ - { - "Name": "schemaName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "TableNotInSelectionSet", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToConvertDefaultValue", - "Parameters": [ - { - "Name": "columnId", - "Type": "System.Object" - }, - { - "Name": "defaultValue", - "Type": "System.Object" - }, - { - "Name": "propertyType", - "Type": "System.Object" - }, - { - "Name": "propertyName", - "Type": "System.Object" - }, - { - "Name": "entityTypeName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToFindColumnForForeignKey", - "Parameters": [ - { - "Name": "fkName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToFindColumnForIndex", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToFindTableForColumn", - "Parameters": [ - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tablename", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToFindTableForIndex", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "schemaName", - "Type": "System.Object" - }, - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerColumnModelAnnotations", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_DateTimePrecision", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DateTimePrecision", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsIdentity", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsIdentity", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerDatabaseModelAnnotationNames", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Prefix", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"SqlServerDatabaseModel:\"" - }, - { - "Kind": "Field", - "Name": "TypeAliases", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"SqlServerDatabaseModel:TypeAliases\"" - }, - { - "Kind": "Field", - "Name": "IsIdentity", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"SqlServerDatabaseModel:IsIdentity\"" - }, - { - "Kind": "Field", - "Name": "IsClustered", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"SqlServerDatabaseModel:IsClustered\"" - }, - { - "Kind": "Field", - "Name": "DateTimePrecision", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"SqlServerDatabaseModel:DateTimePrecision\"" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerDatabaseModelAnnotations", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_TypeAliases", - "Parameters": [], - "ReturnType": "System.Collections.Generic.Dictionary", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_TypeAliases", - "Parameters": [ - { - "Name": "value", - "Type": "System.Collections.Generic.Dictionary" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "databaseModel", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerDatabaseModelExtensions", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "SqlServer", - "Parameters": [ - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerColumnModelAnnotations", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "SqlServer", - "Parameters": [ - { - "Name": "index", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerIndexModelAnnotations", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "SqlServer", - "Parameters": [ - { - "Name": "databaseModel", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerDatabaseModelAnnotations", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.SqlServerIndexModelAnnotations", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_IsClustered", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsClustered", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "index", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqlDataReaderExtension", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "GetValueOrDefault", - "Parameters": [ - { - "Name": "reader", - "Type": "System.Data.SqlClient.SqlDataReader" - }, - { - "Name": "name", - "Type": "System.String" - } - ], - "ReturnType": "T0", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [ - { - "ParameterName": "T", - "ParameterPosition": 0, - "BaseTypeOrInterfaces": [] - } - ] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqlServerDatabaseModelFactory", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Scaffolding.Internal.IInternalDatabaseModelFactory" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_Logger", - "Parameters": [], - "ReturnType": "Microsoft.Extensions.Logging.ILogger", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connection", - "Type": "System.Data.Common.DbConnection" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.IInternalDatabaseModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqlServerDesignTimeServices", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices" - ], - "Members": [ - { - "Kind": "Method", - "Name": "ConfigureDesignTimeServices", - "Parameters": [ - { - "Name": "serviceCollection", - "Type": "Microsoft.Extensions.DependencyInjection.IServiceCollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Infrastructure.IDesignTimeServices", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqlServerScaffoldingModelFactory", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IModel", - "Virtual": true, - "Override": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitColumn", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder", - "Virtual": true, - "Override": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetTypeMapping", - "Parameters": [ - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", - "Virtual": true, - "Override": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitPrimaryKey", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "table", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder", - "Virtual": true, - "Override": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitIndex", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "index", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder", - "Virtual": true, - "Override": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "loggerFactory", - "Type": "Microsoft.Extensions.Logging.ILoggerFactory" - }, - { - "Name": "typeMapper", - "Type": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper" - }, - { - "Name": "databaseModelFactory", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory" - }, - { - "Name": "candidateNamingService", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDesignEventId", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "FoundDefaultSchema", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "FoundTypeAlias", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "ColumnMustBeNamedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "IndexMustBeNamedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - }, - { - "Kind": "Field", - "Name": "IndexTableMissingWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "5" - }, - { - "Kind": "Field", - "Name": "IndexColumnMustBeNamedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "6" - }, - { - "Kind": "Field", - "Name": "ForeignKeyMustBeNamedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "7" - }, - { - "Kind": "Field", - "Name": "ForeignKeyColumnSkipped", - "Parameters": [], - "GenericParameter": [], - "Literal": "8" - }, - { - "Kind": "Field", - "Name": "ColumnNameEmptyOnForeignKey", - "Parameters": [], - "GenericParameter": [], - "Literal": "9" - }, - { - "Kind": "Field", - "Name": "DataTypeDoesNotAllowSqlServerIdentityStrategyWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "10" - }, - { - "Kind": "Field", - "Name": "CannotInterpretDefaultValueWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "11" - }, - { - "Kind": "Field", - "Name": "CannotInterpretComputedValueWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "12" - } - ], - "GenericParameters": [] - } - ] -} \ No newline at end of file diff --git a/src/EFCore.SqlServer.Design/breakingchanges.netcore.json b/src/EFCore.SqlServer.Design/breakingchanges.netcore.json deleted file mode 100644 index a4761d8f071..00000000000 --- a/src/EFCore.SqlServer.Design/breakingchanges.netcore.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.SqlServerDesignEventId", - "Kind": "Removal" - } -] \ No newline at end of file diff --git a/src/EFCore.SqlServer/Design/Internal/SqlServerAnnotationRenderer.cs b/src/EFCore.SqlServer/Design/Internal/SqlServerAnnotationRenderer.cs new file mode 100644 index 00000000000..4d413c5ad6f --- /dev/null +++ b/src/EFCore.SqlServer/Design/Internal/SqlServerAnnotationRenderer.cs @@ -0,0 +1,61 @@ +// 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.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal; +using Microsoft.EntityFrameworkCore.Utilities; + +namespace Microsoft.EntityFrameworkCore.Design.Internal +{ + public class SqlServerAnnotationRenderer : AnnotationRendererBase + { + public override bool IsHandledByConvention(IModel model, IAnnotation annotation) + { + Check.NotNull(model, nameof(model)); + Check.NotNull(annotation, nameof(annotation)); + + if (annotation.Name == RelationalAnnotationNames.DefaultSchema + && string.Equals("dbo", (string)annotation.Value)) + { + return true; + } + + if (annotation.Name == SqlServerDatabaseModelAnnotationNames.TypeAliases) + { + return true; + } + + return false; + } + + public override bool IsHandledByConvention(IProperty property, IAnnotation annotation) + { + Check.NotNull(property, nameof(property)); + Check.NotNull(annotation, nameof(annotation)); + + if (annotation.Name == SqlServerDatabaseModelAnnotationNames.DataTypeSchemaName) + { + return true; + } + + if (annotation.Name == SqlServerDatabaseModelAnnotationNames.IsIdentity) + { + return true; + } + + return false; + } + + public override string GenerateFluentApi(IIndex index, IAnnotation annotation) + { + Check.NotNull(index, nameof(index)); + Check.NotNull(annotation, nameof(annotation)); + + return annotation.Name == SqlServerAnnotationNames.Clustered + ? $".{nameof(SqlServerIndexBuilderExtensions.ForSqlServerIsClustered)}({((bool)annotation.Value == false ? "false" : "")})" + : null; + } + } +} diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs b/src/EFCore.SqlServer/Design/Internal/SqlServerDesignTimeServices.cs similarity index 82% rename from src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs rename to src/EFCore.SqlServer/Design/Internal/SqlServerDesignTimeServices.cs index 3e389e0bee2..5401207c92c 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignTimeServices.cs +++ b/src/EFCore.SqlServer/Design/Internal/SqlServerDesignTimeServices.cs @@ -1,12 +1,13 @@ // 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.Design; +using Microsoft.EntityFrameworkCore.Scaffolding; +using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; using Microsoft.Extensions.DependencyInjection; -namespace Microsoft.EntityFrameworkCore.Scaffolding.Internal +namespace Microsoft.EntityFrameworkCore.Design.Internal { /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used @@ -20,9 +21,9 @@ public class SqlServerDesignTimeServices : IDesignTimeServices /// public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollection) => serviceCollection - .AddSingleton() .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); } } diff --git a/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs b/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs index 9199648dd17..1e554e44b61 100644 --- a/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs +++ b/src/EFCore.SqlServer/Diagnostics/SqlServerEventId.cs @@ -25,7 +25,13 @@ private enum Id { // Model validation events DecimalTypeDefaultWarning = CoreEventId.ProviderBaseId, - ByteIdentityColumnWarning + ByteIdentityColumnWarning, + + ColumnFound = CoreEventId.ProviderBaseId + 100, + ForeignKeyColumnFound, + DefaultSchemaFound, + TypeAliasFound, + DataTypeDoesNotAllowSqlServerIdentityStrategyWarning } private static readonly string _validationPrefix = DbLoggerCategory.Model.Validation.Name + "."; @@ -56,5 +62,38 @@ private enum Id /// /// public static readonly EventId ByteIdentityColumnWarning = MakeValidationId(Id.ByteIdentityColumnWarning); + + private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; + private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); + + /// + /// A column was found. + /// This event is in the category. + /// + public static readonly EventId ColumnFound = MakeScaffoldingId(Id.ColumnFound); + + /// + /// A column of a foreign key was found. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyColumnFound = MakeScaffoldingId(Id.ForeignKeyColumnFound); + + /// + /// A default schema was found. + /// This event is in the category. + /// + public static readonly EventId DefaultSchemaFound = MakeScaffoldingId(Id.DefaultSchemaFound); + + /// + /// A type alias was found. + /// This event is in the category. + /// + public static readonly EventId TypeAliasFound = MakeScaffoldingId(Id.TypeAliasFound); + + /// + /// The data type does not support the SQL Server identity strategy. + /// This event is in the category. + /// + public static readonly EventId DataTypeDoesNotAllowSqlServerIdentityStrategyWarning = MakeScaffoldingId(Id.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning); } } diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignLoggerExtensions.cs b/src/EFCore.SqlServer/Internal/SqlServerLoggerExtensions.cs similarity index 68% rename from src/EFCore.SqlServer.Design/Internal/SqlServerDesignLoggerExtensions.cs rename to src/EFCore.SqlServer/Internal/SqlServerLoggerExtensions.cs index 0427e08f7bd..3a33df40a73 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDesignLoggerExtensions.cs +++ b/src/EFCore.SqlServer/Internal/SqlServerLoggerExtensions.cs @@ -1,10 +1,11 @@ -// Copyright (c) .NET Foundation. All rights reserved. +// 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 System.Diagnostics; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Metadata.Internal; using Microsoft.Extensions.Logging; namespace Microsoft.EntityFrameworkCore.Internal @@ -13,8 +14,80 @@ namespace Microsoft.EntityFrameworkCore.Internal /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// - public static class SqlServerDesignLoggerExtensions + public static class SqlServerLoggerExtensions { + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void DecimalTypeDefaultWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [NotNull] IProperty property) + { + var definition = SqlServerStrings.LogDefaultDecimalTypeColumn; + + // Checking for enabled here to avoid string formatting if not needed. + if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) + { + definition.Log(diagnostics, property.Name, property.DeclaringEntityType.DisplayName()); + } + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new PropertyEventData( + definition, + DecimalTypeDefaultWarning, + property)); + } + } + + private static string DecimalTypeDefaultWarning(EventDefinitionBase definition, EventDataBase payload) + { + var d = (EventDefinition)definition; + var p = (PropertyEventData)payload; + return d.GenerateMessage( + p.Property.Name, + p.Property.DeclaringEntityType.DisplayName()); + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ByteIdentityColumnWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [NotNull] IProperty property) + { + var definition = SqlServerStrings.LogByteIdentityColumn; + + // Checking for enabled here to avoid string formatting if not needed. + if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) + { + definition.Log(diagnostics, property.Name, property.DeclaringEntityType.DisplayName()); + } + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new PropertyEventData( + definition, + ByteIdentityColumnWarning, + property)); + } + } + + private static string ByteIdentityColumnWarning(EventDefinitionBase definition, EventDataBase payload) + { + var d = (EventDefinition)definition; + var p = (PropertyEventData)payload; + return d.GenerateMessage( + p.Property.Name, + p.Property.DeclaringEntityType.DisplayName()); + } + /// /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. @@ -35,7 +108,7 @@ public static void ColumnFound( [CanBeNull] bool? identity, [CanBeNull] bool? computed) { - var definition = SqlServerDesignStrings.LogFoundColumn; + var definition = SqlServerStrings.LogFoundColumn; Debug.Assert(LogLevel.Debug == definition.Level); @@ -100,7 +173,7 @@ public static void ForeignKeyColumnFound( [CanBeNull] string deleteAction, int? ordinal) { - var definition = SqlServerDesignStrings.LogFoundForeignKeyColumn; + var definition = SqlServerStrings.LogFoundForeignKeyColumn; Debug.Assert(LogLevel.Debug == definition.Level); @@ -148,7 +221,7 @@ public static void DefaultSchemaFound( [NotNull] this IDiagnosticsLogger diagnostics, [CanBeNull] string schemaName) { - var definition = SqlServerDesignStrings.LogFoundDefaultSchema; + var definition = SqlServerStrings.LogFoundDefaultSchema; definition.Log(diagnostics, schemaName); @@ -172,7 +245,7 @@ public static void TypeAliasFound( [CanBeNull] string typeAliasName, [CanBeNull] string systemTypeName) { - var definition = SqlServerDesignStrings.LogFoundTypeAlias; + var definition = SqlServerStrings.LogFoundTypeAlias; definition.Log(diagnostics, typeAliasName, systemTypeName); @@ -197,7 +270,7 @@ public static void DataTypeDoesNotAllowSqlServerIdentityStrategyWarning( [CanBeNull] string columnName, [CanBeNull] string typeName) { - var definition = SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy; + var definition = SqlServerStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy; definition.Log(diagnostics, columnName, typeName); diff --git a/src/EFCore.SqlServer/Properties/AssemblyInfo.cs b/src/EFCore.SqlServer/Properties/AssemblyInfo.cs index 38ce4096019..35c744b96f5 100644 --- a/src/EFCore.SqlServer/Properties/AssemblyInfo.cs +++ b/src/EFCore.SqlServer/Properties/AssemblyInfo.cs @@ -4,6 +4,6 @@ using Microsoft.EntityFrameworkCore.Design; [assembly: DesignTimeProviderServices( - typeName: "Microsoft.EntityFrameworkCore.Scaffolding.Internal.SqlServerDesignTimeServices", - assemblyName: "Microsoft.EntityFrameworkCore.SqlServer.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - packageName: "Microsoft.EntityFrameworkCore.SqlServer.Design")] + typeName: "Microsoft.EntityFrameworkCore.Design.Internal.SqlServerDesignTimeServices", + assemblyName: "Microsoft.EntityFrameworkCore.SqlServer, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", + packageName: "Microsoft.EntityFrameworkCore.SqlServer")] diff --git a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs index 1c1c17be0f9..fb1b03e4a40 100644 --- a/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs +++ b/src/EFCore.SqlServer/Properties/SqlServerStrings.Designer.cs @@ -106,6 +106,60 @@ public static string IncompatibleTableMemoryOptimizedMismatch([CanBeNull] object GetString("IncompatibleTableMemoryOptimizedMismatch", nameof(table), nameof(entityType), nameof(otherEntityType), nameof(memoryOptimizedEntityType), nameof(nonMemoryOptimizedEntityType)), table, entityType, otherEntityType, memoryOptimizedEntityType, nonMemoryOptimizedEntityType); + /// + /// For column {columnId}. This column is set up as an Identity column, but the SQL Server data type is {sqlServerDataType}. This will be mapped to CLR type byte which does not allow the SqlServerValueGenerationStrategy.IdentityColumn setting. Generating a matching Property but ignoring the Identity setting. + /// + public static readonly EventDefinition LogDataTypeDoesNotAllowSqlServerIdentityStrategy + = new EventDefinition( + SqlServerEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + SqlServerEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning, + _resourceManager.GetString("LogDataTypeDoesNotAllowSqlServerIdentityStrategy"))); + + /// + /// Found default schema {defaultSchema}. + /// + public static readonly EventDefinition LogFoundDefaultSchema + = new EventDefinition( + SqlServerEventId.DefaultSchemaFound, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + SqlServerEventId.DefaultSchemaFound, + _resourceManager.GetString("LogFoundDefaultSchema"))); + + /// + /// Found type alias with name: {alias} which maps to underlying data type {dataType}. + /// + public static readonly EventDefinition LogFoundTypeAlias + = new EventDefinition( + SqlServerEventId.TypeAliasFound, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + SqlServerEventId.TypeAliasFound, + _resourceManager.GetString("LogFoundTypeAlias"))); + + /// + /// Found column with table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, nullable: {isNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}, computed value: {computedValue}, precision: {precision}, scale: {scale}, maximum length: {maxLength}, identity: {isIdentity}, computed: {isComputed}. + /// + public static readonly FallbackEventDefinition LogFoundColumn + = new FallbackEventDefinition( + SqlServerEventId.ColumnFound, + LogLevel.Debug, + _resourceManager.GetString("LogFoundColumn")); + + /// + /// Found foreign key column with table: {tableName}, foreign key name: {fkName}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, update action: {updateAction}, delete action: {deleteAction}, ordinal: {ordinal}. + /// + public static readonly FallbackEventDefinition LogFoundForeignKeyColumn + = new FallbackEventDefinition( + SqlServerEventId.ForeignKeyColumnFound, + LogLevel.Debug, + _resourceManager.GetString("LogFoundForeignKeyColumn")); + private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); diff --git a/src/EFCore.SqlServer/Properties/SqlServerStrings.resx b/src/EFCore.SqlServer/Properties/SqlServerStrings.resx index 9c15a276a86..8f27090e36d 100644 --- a/src/EFCore.SqlServer/Properties/SqlServerStrings.resx +++ b/src/EFCore.SqlServer/Properties/SqlServerStrings.resx @@ -152,4 +152,24 @@ Cannot use table '{table}' for entity type '{entityType}' since it is being used for entity type '{otherEntityType}' and entity type '{memoryOptimizedEntityType}' is marked as memory-optimized, but entity type '{nonMemoryOptimizedEntityType}' is not. + + For column {columnId}. This column is set up as an Identity column, but the SQL Server data type is {sqlServerDataType}. This will be mapped to CLR type byte which does not allow the SqlServerValueGenerationStrategy.IdentityColumn setting. Generating a matching Property but ignoring the Identity setting. + Warning SqlServerEventId.DataTypeDoesNotAllowSqlServerIdentityStrategyWarning string string + + + Found default schema {defaultSchema}. + Debug SqlServerEventId.DefaultSchemaFound string + + + Found type alias with name: {alias} which maps to underlying data type {dataType}. + Debug SqlServerEventId.TypeAliasFound string string + + + Found column with table: {tableName}, column name: {columnName}, data type: {dataType}, ordinal: {ordinal}, nullable: {isNullable}, primary key ordinal: {primaryKeyOrdinal}, default value: {defaultValue}, computed value: {computedValue}, precision: {precision}, scale: {scale}, maximum length: {maxLength}, identity: {isIdentity}, computed: {isComputed}. + Debug SqlServerEventId.ColumnFound string string string int? bool? int? string string int? int? int? bool? bool? + + + Found foreign key column with table: {tableName}, foreign key name: {fkName}, principal table: {principalTableName}, column name: {columnName}, principal column name: {principalColumnName}, update action: {updateAction}, delete action: {deleteAction}, ordinal: {ordinal}. + Debug SqlServerEventId.ForeignKeyColumnFound string string string string string string string int? + \ No newline at end of file diff --git a/src/EFCore.SqlServer.Design/Internal/SqlDataReaderExtension.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlDataReaderExtension.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Internal/SqlDataReaderExtension.cs rename to src/EFCore.SqlServer/Scaffolding/Internal/SqlDataReaderExtension.cs diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs similarity index 97% rename from src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs rename to src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs index 995ce844035..8b961db510e 100644 --- a/src/EFCore.SqlServer.Design/Internal/SqlServerDatabaseModelFactory.cs +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs @@ -159,9 +159,11 @@ private void GetDefaultSchema() { var command = _connection.CreateCommand(); command.CommandText = "SELECT SCHEMA_NAME()"; - var schema = command.ExecuteScalar() as string ?? "dbo"; - Logger.DefaultSchemaFound(schema); - _databaseModel.DefaultSchemaName = schema; + if (command.ExecuteScalar() is string schema) + { + Logger.DefaultSchemaFound(schema); + _databaseModel.DefaultSchemaName = schema; + } } private void GetTypeAliases() @@ -292,7 +294,12 @@ FROM sys.extended_properties if (!string.IsNullOrEmpty(MemoryOptimizedTableColumn)) { - table[SqlServerAnnotationNames.MemoryOptimized] = reader.GetValueOrDefault("is_memory_optimized"); + var isTableMemoryOptimized = reader.GetValueOrDefault("is_memory_optimized"); + + if (isTableMemoryOptimized == true) + { + table[SqlServerAnnotationNames.MemoryOptimized] = true; + } } Logger.TableFound(table.DisplayName); @@ -422,6 +429,16 @@ WHERE t.name <> '" + HistoryRepository.DefaultTableName + "'" + } } + if (defaultValue == "(NULL)") + { + defaultValue = null; + } + + if (computedValue == "(NULL)") + { + computedValue = null; + } + var column = new ColumnModel { Table = table, @@ -521,7 +538,11 @@ AND object_name(i.object_id) <> '" + HistoryRepository.DefaultTableName + @"'" + IsUnique = isUnique, Filter = hasFilter ? filterDefinition : null }; - index.SqlServer().IsClustered = typeDesc == "CLUSTERED"; + + if (typeDesc == "CLUSTERED") + { + index[SqlServerAnnotationNames.Clustered] = true; + } table.Indexes.Add(index); } diff --git a/src/EFCore.SqlServer.Design/Internal/SqlServerTableSelectionSetExtensions.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerTableSelectionSetExtensions.cs similarity index 100% rename from src/EFCore.SqlServer.Design/Internal/SqlServerTableSelectionSetExtensions.cs rename to src/EFCore.SqlServer/Scaffolding/Internal/SqlServerTableSelectionSetExtensions.cs diff --git a/src/EFCore.SqlServer/Storage/Internal/SqlServerLoggerExtensions.cs b/src/EFCore.SqlServer/Storage/Internal/SqlServerLoggerExtensions.cs deleted file mode 100644 index 88e321f7fa5..00000000000 --- a/src/EFCore.SqlServer/Storage/Internal/SqlServerLoggerExtensions.cs +++ /dev/null @@ -1,89 +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 JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Metadata.Internal; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class SqlServerLoggerExtensions - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void DecimalTypeDefaultWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [NotNull] IProperty property) - { - var definition = SqlServerStrings.LogDefaultDecimalTypeColumn; - - // Checking for enabled here to avoid string formatting if not needed. - if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) - { - definition.Log(diagnostics, property.Name, property.DeclaringEntityType.DisplayName()); - } - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new PropertyEventData( - definition, - DecimalTypeDefaultWarning, - property)); - } - } - - private static string DecimalTypeDefaultWarning(EventDefinitionBase definition, EventDataBase payload) - { - var d = (EventDefinition)definition; - var p = (PropertyEventData)payload; - return d.GenerateMessage( - p.Property.Name, - p.Property.DeclaringEntityType.DisplayName()); - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ByteIdentityColumnWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [NotNull] IProperty property) - { - var definition = SqlServerStrings.LogByteIdentityColumn; - - // Checking for enabled here to avoid string formatting if not needed. - if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) - { - definition.Log(diagnostics, property.Name, property.DeclaringEntityType.DisplayName()); - } - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new PropertyEventData( - definition, - ByteIdentityColumnWarning, - property)); - } - } - - private static string ByteIdentityColumnWarning(EventDefinitionBase definition, EventDataBase payload) - { - var d = (EventDefinition)definition; - var p = (PropertyEventData)payload; - return d.GenerateMessage( - p.Property.Name, - p.Property.DeclaringEntityType.DisplayName()); - } - } -} diff --git a/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs index 01f14738e10..d21ecbcb795 100644 --- a/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs +++ b/src/EFCore.Sqlite.Core/Design/Internal/SqliteDesignTimeServices.cs @@ -23,6 +23,7 @@ public virtual void ConfigureDesignTimeServices(IServiceCollection serviceCollec => serviceCollection .AddSingleton() .AddSingleton() - .AddSingleton(); + .AddSingleton() + .AddSingleton(); } } \ No newline at end of file diff --git a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs index e8944a44342..e167112f70f 100644 --- a/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/ReverseEngineeringConfigurationTests.cs @@ -2,7 +2,10 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using Microsoft.EntityFrameworkCore.Design; +using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Internal; +using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.ReverseEngineering; using Microsoft.EntityFrameworkCore.Scaffolding.Metadata; using Microsoft.EntityFrameworkCore.TestUtilities; @@ -26,7 +29,7 @@ private void ValidateContextNameInReverseEngineerGenerator(string contextName) new FakeScaffoldingModelFactory(new FakeDiagnosticsLogger()), new CSharpScaffoldingGenerator( new InMemoryFileService(), - new CSharpDbContextGenerator(new FakeScaffoldingHelper(), CSharpUtilities.Instance), + new CSharpDbContextGenerator(new FakeScaffoldingHelper(), new FakeAnnotationRenderer(), CSharpUtilities.Instance), new CSharpEntityTypeGenerator(CSharpUtilities.Instance)), CSharpUtilities.Instance); @@ -58,5 +61,68 @@ public TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) throw new NotImplementedException(); } } + + public class FakeAnnotationRenderer : IAnnotationRenderer + { + public string GenerateFluentApi(IModel model, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public string GenerateFluentApi(IEntityType entityType, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public string GenerateFluentApi(IKey key, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public string GenerateFluentApi(IProperty property, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public string GenerateFluentApi(IForeignKey foreignKey, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public string GenerateFluentApi(IIndex index, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IModel model, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IEntityType entityType, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IKey key, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IProperty property, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IForeignKey foreignKey, IAnnotation annotation) + { + throw new NotImplementedException(); + } + + public bool IsHandledByConvention(IIndex index, IAnnotation annotation) + { + throw new NotImplementedException(); + } + } } } diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj b/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj index 57a9108b7f4..b5cc9072f1e 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj +++ b/test/EFCore.SqlServer.Design.FunctionalTests/EFCore.SqlServer.Design.FunctionalTests.csproj @@ -29,7 +29,6 @@ - diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql index fd0e591f380..4db7fa009c7 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/E2E.sql @@ -371,7 +371,7 @@ CREATE TABLE "OneToOneFKToUniqueKeyDependent" ( "SomeColumn" nvarchar (20) NOT NULL, "OneToOneFKToUniqueKeyDependentFK1" "int" NULL, "OneToOneFKToUniqueKeyDependentFK2" "int" NULL, - CONSTRAINT "PK_OneToOneFKToUniqueKeyDependent" PRIMARY KEY CLUSTERED + CONSTRAINT "PK_OneToOneFKToUniqueKeyDependent" PRIMARY KEY ( "OneToOneFKToUniqueKeyDependentID1", "OneToOneFKToUniqueKeyDependentID2" ), @@ -381,7 +381,7 @@ CREATE TABLE "OneToOneFKToUniqueKeyDependent" ( ) REFERENCES "dbo"."OneToOneFKToUniqueKeyPrincipal" ( "OneToOneFKToUniqueKeyPrincipalUniqueKey1", "OneToOneFKToUniqueKeyPrincipalUniqueKey2" ), - CONSTRAINT "UK_OneToOneFKToUniqueKeyDependent" UNIQUE + CONSTRAINT "UK_OneToOneFKToUniqueKeyDependent" UNIQUE CLUSTERED ( "OneToOneFKToUniqueKeyDependentFK1", "OneToOneFKToUniqueKeyDependentFK2" ) diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs index e70cd262846..5c64a617247 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SqlServerReverseEngineerTestE2EContext.cs @@ -383,7 +383,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasIndex(e => new { e.OneToOneFktoUniqueKeyDependentFk1, e.OneToOneFktoUniqueKeyDependentFk2 }) .HasName("UK_OneToOneFKToUniqueKeyDependent") - .IsUnique(); + .IsUnique() + .ForSqlServerIsClustered(); entity.Property(e => e.OneToOneFktoUniqueKeyDependentId1).HasColumnName("OneToOneFKToUniqueKeyDependentID1"); diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs index 0fb15052d55..888ee2a208f 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AllDataTypes.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class AllDataTypes { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs index cb238089bbe..5a8d4904af3 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/AttributesContext.cs @@ -2,7 +2,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class AttributesContext : DbContext { @@ -116,7 +116,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasIndex(e => new { e.OneToOneFktoUniqueKeyDependentFk1, e.OneToOneFktoUniqueKeyDependentFk2 }) .HasName("UK_OneToOneFKToUniqueKeyDependent") - .IsUnique(); + .IsUnique() + .ForSqlServerIsClustered(); entity.HasOne(d => d.OneToOneFktoUniqueKeyDependentFk) .WithOne(p => p.OneToOneFktoUniqueKeyDependent) diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs index a1f5bff1d47..8f126ba6cc8 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsDependent.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("MultipleFKsDependent")] public partial class MultipleFksDependent diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs index b0caabf42fa..b3a1f6fb986 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/MultipleFKsPrincipal.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("MultipleFKsPrincipal")] public partial class MultipleFksPrincipal diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs index 6f8e22f1e66..9a39aaf0c9f 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyDependent.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class OneToManyDependent { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs index 44208ed844c..d4e98879f48 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToManyPrincipal.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class OneToManyPrincipal { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs index 32592e640de..20cd4556a16 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneDependent.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class OneToOneDependent { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs index 1eae458c1a8..d3da1a38809 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyDependent.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("OneToOneFKToUniqueKeyDependent")] public partial class OneToOneFktoUniqueKeyDependent diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs index f8d49dd8626..3f07bad319c 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneFKToUniqueKeyPrincipal.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("OneToOneFKToUniqueKeyPrincipal")] public partial class OneToOneFktoUniqueKeyPrincipal diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs index bdaaec23edd..8216059c6ab 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOnePrincipal.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class OneToOnePrincipal { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs index 73c20435556..a1e0b312e82 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKDependent.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("OneToOneSeparateFKDependent")] public partial class OneToOneSeparateFkdependent diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs index 82f7987c772..97863754bbb 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOneSeparateFKPrincipal.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("OneToOneSeparateFKPrincipal")] public partial class OneToOneSeparateFkprincipal diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs index 83fd1ba4d8c..a3f91fca53d 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/PropertyConfiguration.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class PropertyConfiguration { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs index 13375e87c47..1c1e7c0eca9 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfReferencing.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { public partial class SelfReferencing { diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs index 7ec24e44269..3c50c1fb04b 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/TestSpacesKeywordsTable.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("Test Spaces Keywords Table")] public partial class TestSpacesKeywordsTable diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs index f104f778874..e1d9c4b5ae4 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/UnmappablePKColumn.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -namespace E2ETest.Namespace +namespace E2ETest.Namespace.SubDir { [Table("UnmappablePKColumn")] public partial class UnmappablePkcolumn diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index d8df4dc130d..138038cf968 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -5,6 +5,7 @@ using System.Data.SqlClient; using System.IO; using System.Linq; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Internal; using Microsoft.EntityFrameworkCore.Scaffolding; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; @@ -103,8 +104,7 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() var expectedFileSet = new FileSet(new FileSystemFileService(), Path.Combine("ReverseEngineering", "Expected", "Attributes"), - contents => contents.Replace("namespace " + TestNamespace, "namespace " + TestNamespace + "." + TestSubDir) - .Replace("{{connectionString}}", _connectionString)) + contents => contents.Replace("{{connectionString}}", _connectionString)) { Files = new List { "AttributesContext.cs" } .Concat(_expectedEntityTypeFiles).ToList() diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs b/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs index 6340b4ecd14..a3bbb93ed67 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/SqlServerDatabaseModelFactoryTest.cs @@ -13,6 +13,7 @@ using Microsoft.EntityFrameworkCore.TestUtilities.Xunit; using Microsoft.EntityFrameworkCore.Utilities; using Xunit; +using Microsoft.EntityFrameworkCore.Metadata.Internal; namespace Microsoft.EntityFrameworkCore { @@ -138,14 +139,14 @@ public void It_reads_indexes() nonClustered => { Assert.Equal("IX_Location", nonClustered.Name); - Assert.False(nonClustered.SqlServer().IsClustered); + //Assert.False(nonClustered.GetAnnotations().SingleOrDefault(a => a.Name == SqlServerAnnotationNames.Clustered)?.Value); Assert.Equal("Location", nonClustered.IndexColumns.Select(ic => ic.Column.Name).Single()); }, clusteredIndex => { Assert.Equal("IX_Location_Name", clusteredIndex.Name); Assert.False(clusteredIndex.IsUnique); - Assert.True(clusteredIndex.SqlServer().IsClustered); + //Assert.True(clusteredIndex.SqlServer().IsClustered); Assert.Equal(new List { "Location", "Name" }, clusteredIndex.IndexColumns.Select(ic => ic.Column.Name).ToList()); Assert.Equal(new List { 1, 2 }, clusteredIndex.IndexColumns.Select(ic => ic.Ordinal).ToList()); }, @@ -153,7 +154,7 @@ public void It_reads_indexes() { Assert.StartsWith("PK__Place", pkIndex.Name); Assert.True(pkIndex.IsUnique); - Assert.False(pkIndex.SqlServer().IsClustered); + //Assert.False(pkIndex.SqlServer().IsClustered); Assert.Equal(new List { "Id" }, pkIndex.IndexColumns.Select(ic => ic.Column.Name).ToList()); }, unique => diff --git a/test/EFCore.SqlServer.Design.Tests/ApiConsistencyTest.cs b/test/EFCore.SqlServer.Design.Tests/ApiConsistencyTest.cs deleted file mode 100644 index 7f3f5e0436b..00000000000 --- a/test/EFCore.SqlServer.Design.Tests/ApiConsistencyTest.cs +++ /dev/null @@ -1,13 +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 System.Reflection; -using Microsoft.EntityFrameworkCore.Scaffolding.Internal; - -namespace Microsoft.EntityFrameworkCore -{ - public class ApiConsistencyTest : ApiConsistencyTestBase - { - protected override Assembly TargetAssembly => typeof(SqlServerScaffoldingModelFactory).GetTypeInfo().Assembly; - } -} diff --git a/test/EFCore.SqlServer.Design.Tests/EFCore.SqlServer.Design.Tests.csproj b/test/EFCore.SqlServer.Design.Tests/EFCore.SqlServer.Design.Tests.csproj deleted file mode 100644 index a81730e0ff5..00000000000 --- a/test/EFCore.SqlServer.Design.Tests/EFCore.SqlServer.Design.Tests.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - net461;netcoreapp2.0 - netcoreapp2.0 - Microsoft.EntityFrameworkCore.SqlServer.Design.Tests - Microsoft.EntityFrameworkCore - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignEventIdTest.cs b/test/EFCore.SqlServer.Design.Tests/SqlServerDesignEventIdTest.cs deleted file mode 100644 index de04b15f9ad..00000000000 --- a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignEventIdTest.cs +++ /dev/null @@ -1,29 +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 System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Xunit; - -namespace Microsoft.EntityFrameworkCore -{ - public class SqlServerDesignEventIdTest - { - [Fact] - public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() - { - var fakeFactories = new Dictionary> - { - { typeof(string), () => "Fake" } - }; - - SqlServerTestHelpers.Instance.TestEventLogging( - typeof(SqlServerDesignEventId), - typeof(SqlServerDesignLoggerExtensions), - fakeFactories); - } - } -} diff --git a/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj b/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj index b39c7a37b61..67ce18184ee 100644 --- a/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj +++ b/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj @@ -27,7 +27,6 @@ - diff --git a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs b/test/EFCore.SqlServer.Tests/Design/SqlServerDesignTimeProviderServicesTest.cs similarity index 93% rename from test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs rename to test/EFCore.SqlServer.Tests/Design/SqlServerDesignTimeProviderServicesTest.cs index 08fe59e45f0..63b4f2a954c 100644 --- a/test/EFCore.SqlServer.Design.Tests/SqlServerDesignTimeProviderServicesTest.cs +++ b/test/EFCore.SqlServer.Tests/Design/SqlServerDesignTimeProviderServicesTest.cs @@ -4,6 +4,7 @@ using System; using System.Reflection; using Microsoft.EntityFrameworkCore.Design; +using Microsoft.EntityFrameworkCore.Design.Internal; using Microsoft.EntityFrameworkCore.Scaffolding.Internal; using Microsoft.EntityFrameworkCore.Storage.Internal; diff --git a/test/EFCore.SqlServer.Design.Tests/ScaffoldingTypeMapperSqlServerTest.cs b/test/EFCore.SqlServer.Tests/Scaffolding/ScaffoldingTypeMapperSqlServerTest.cs similarity index 100% rename from test/EFCore.SqlServer.Design.Tests/ScaffoldingTypeMapperSqlServerTest.cs rename to test/EFCore.SqlServer.Tests/Scaffolding/ScaffoldingTypeMapperSqlServerTest.cs diff --git a/test/EFCore.SqlServer.Design.Tests/SqlServerTableSelectionSetExtensionsTests.cs b/test/EFCore.SqlServer.Tests/Scaffolding/SqlServerTableSelectionSetExtensionsTests.cs similarity index 100% rename from test/EFCore.SqlServer.Design.Tests/SqlServerTableSelectionSetExtensionsTests.cs rename to test/EFCore.SqlServer.Tests/Scaffolding/SqlServerTableSelectionSetExtensionsTests.cs diff --git a/test/EFCore.SqlServer.Tests/SqlServerEventIdTest.cs b/test/EFCore.SqlServer.Tests/SqlServerEventIdTest.cs index b1c6c320c8e..81351bd2189 100644 --- a/test/EFCore.SqlServer.Tests/SqlServerEventIdTest.cs +++ b/test/EFCore.SqlServer.Tests/SqlServerEventIdTest.cs @@ -23,7 +23,8 @@ public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() var fakeFactories = new Dictionary> { - { typeof(IProperty), () => property } + { typeof(IProperty), () => property }, + { typeof(string), () => "Fake" } }; SqlServerTestHelpers.Instance.TestEventLogging( diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs index ab91497cb9b..51adb9d63ba 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/FkToAltKey/FkToAltKeyContext.cs @@ -22,6 +22,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.HasOne(d => d.UserAlt) .WithMany(p => p.Comment) .HasPrincipalKey(p => p.AltId) @@ -34,6 +36,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasIndex(e => e.AltId) .HasName("sqlite_autoindex_User_1") .IsUnique(); + + entity.Property(e => e.Id).ValueGeneratedNever(); }); } } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs index a3a7c07737e..567c3392bed 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/ManyToMany/ManyToManyFluentApiContext.cs @@ -21,6 +21,16 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + modelBuilder.Entity(entity => { entity.ToTable("Users_Groups"); @@ -29,6 +39,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasName("sqlite_autoindex_Users_Groups_2") .IsUnique(); + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.HasOne(d => d.Group) .WithMany(p => p.UsersGroups) .HasForeignKey(d => d.GroupId); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs index 2f9d64c8f51..8f8312f86e5 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/NoPrincipalPk/NoPrincipalPkFluentApiContext.cs @@ -23,6 +23,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.Property(e => e.PrincipalId).HasColumnType("INT"); }); } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs index 573fb0138c7..ae6cf5fb980 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/OneToOne/OneToOneFluentApiContext.cs @@ -26,7 +26,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasName("sqlite_autoindex_Dependent_1") .IsUnique(); - entity.Property(e => e.Id).HasColumnType("INT"); + entity.Property(e => e.Id) + .HasColumnType("INT") + .ValueGeneratedNever(); entity.Property(e => e.PrincipalId).HasColumnType("INT"); @@ -35,6 +37,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasForeignKey(d => d.PrincipalId) .OnDelete(DeleteBehavior.Restrict); }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); } } } \ No newline at end of file diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs index 778b2f893fc..6d7b0a99978 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/AllFluentApi/SelfRef/SelfRefFluentApiContext.cs @@ -21,6 +21,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.HasOne(d => d.SelfForeignKeyNavigation) .WithMany(p => p.InverseSelfForeignKeyNavigation) .HasForeignKey(d => d.SelfForeignKey); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs index d84d5b8a072..9b9fb18f3f4 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/FkToAltKey/FkToAltKeyContext.cs @@ -22,6 +22,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(entity => { + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.HasOne(d => d.UserAlt) .WithMany(p => p.Comment) .HasPrincipalKey(p => p.AltId) @@ -34,6 +36,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.HasIndex(e => e.AltId) .HasName("sqlite_autoindex_User_1") .IsUnique(); + + entity.Property(e => e.Id).ValueGeneratedNever(); }); } } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs index 5f6c4ef62f5..6b0192835f9 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/ManyToMany/ManyToManyAttributesContext.cs @@ -21,11 +21,23 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnModelCreating(ModelBuilder modelBuilder) { + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + modelBuilder.Entity(entity => { entity.HasIndex(e => new { e.UserId, e.GroupId }) .HasName("sqlite_autoindex_Users_Groups_2") .IsUnique(); + + entity.Property(e => e.Id).ValueGeneratedNever(); }); } } diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs index ad8213e7ad5..5ae93547af1 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/NoPrincipalPk/NoPrincipalPkAttributesContext.cs @@ -20,6 +20,11 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) } protected override void OnModelCreating(ModelBuilder modelBuilder) - {} + { + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + } } } \ No newline at end of file diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs index 6b598540040..cd6be97ac66 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/OneToOne/OneToOneAttributesContext.cs @@ -26,11 +26,18 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) .HasName("sqlite_autoindex_Dependent_1") .IsUnique(); + entity.Property(e => e.Id).ValueGeneratedNever(); + entity.HasOne(d => d.Principal) .WithOne(p => p.Dependent) .HasForeignKey(d => d.PrincipalId) .OnDelete(DeleteBehavior.Restrict); }); + + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); } } } \ No newline at end of file diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs index ba2bb77541f..4fd4be92dfe 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/Expected/Attributes/SelfRef/SelfRefAttributesContext.cs @@ -18,6 +18,11 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) } protected override void OnModelCreating(ModelBuilder modelBuilder) - {} + { + modelBuilder.Entity(entity => + { + entity.Property(e => e.Id).ValueGeneratedNever(); + }); + } } } \ No newline at end of file diff --git a/test/EFCore.Sqlite.Tests/Design/ScaffoldingTypeMapperSqliteTest.cs b/test/EFCore.Sqlite.Tests/Scaffolding/ScaffoldingTypeMapperSqliteTest.cs similarity index 100% rename from test/EFCore.Sqlite.Tests/Design/ScaffoldingTypeMapperSqliteTest.cs rename to test/EFCore.Sqlite.Tests/Scaffolding/ScaffoldingTypeMapperSqliteTest.cs diff --git a/test/EFCore.Sqlite.Tests/Design/SqliteTableSelectionSetExtensionsTests.cs b/test/EFCore.Sqlite.Tests/Scaffolding/SqliteTableSelectionSetExtensionsTests.cs similarity index 100% rename from test/EFCore.Sqlite.Tests/Design/SqliteTableSelectionSetExtensionsTests.cs rename to test/EFCore.Sqlite.Tests/Scaffolding/SqliteTableSelectionSetExtensionsTests.cs From 778a8434444cd05fc5b52ea4de3c6bbb6f5e252d Mon Sep 17 00:00:00 2001 From: Smit Patel Date: Thu, 1 Jun 2017 15:51:15 -0700 Subject: [PATCH 11/11] Remove Relational.Design package --- EFCore.sln | 14 - .../Diagnostics/DesignEventId.cs | 95 + src/EFCore.Design/EFCore.Design.csproj | 2 +- .../Infrastructure/IPluralizer.cs | 0 .../Internal/DesignLoggerExtensions.cs | 258 ++ .../Properties/DesignStrings.Designer.cs | 132 + .../Properties/DesignStrings.resx | 45 + .../Scaffolding}/Internal/CSharpNamer.cs | 0 .../Internal/CSharpUniqueNamer.cs | 0 .../Scaffolding}/Internal/CSharpUtilities.cs | 0 .../Internal/CandidateNamingService.cs | 0 .../Internal}/IScaffoldingModelFactory.cs | 0 .../Scaffolding/Internal/ModelScaffolder.cs | 6 +- .../Scaffolding}/Internal/NullPluralizer.cs | 0 .../RelationalScaffoldingModelFactory.cs | 2 +- ...lational.Design.Specification.Tests.csproj | 2 +- .../Diagnostics/RelationalDesignEventId.cs | 244 -- .../EFCore.Relational.Design.csproj | 52 - .../RelationalDesignLoggerExtensions.cs | 809 ---- .../Properties/InternalsVisibleTo.cs | 10 - .../RelationalDesignStrings.Designer.cs | 413 --- .../RelationalDesignStrings.Designer.tt | 4 - .../Properties/RelationalDesignStrings.resx | 249 -- .../baseline.netcore.json | 3259 ----------------- .../breakingchanges.netcore.json | 73 - ...Core.Relational.Specification.Tests.csproj | 1 - .../Diagnostics/RelationalEventId.cs | 156 +- .../Internal/RelationalLoggerExtensions.cs | 558 +++ .../Properties/RelationalStrings.Designer.cs | 249 ++ .../Properties/RelationalStrings.resx | 85 + .../Scaffolding}/DbDataReaderExtension.cs | 0 .../Scaffolding}/IDatabaseModelFactory.cs | 0 .../Scaffolding}/TableSelectionSet.cs | 0 src/EFCore.SqlServer/EFCore.SqlServer.csproj | 1 - .../Internal/SqlServerScaffoldingHelper.cs | 4 +- .../EFCore.Sqlite.Core.csproj | 1 - .../Internal/SqliteScaffoldingHelper.cs | 4 +- src/EFCore/Diagnostics/CoreEventId.cs | 5 - .../EFCore.Design.Tests.csproj | 2 +- .../Scaffolding/Internal}/CSharpNamerTest.cs | 0 .../Internal}/CSharpUniqueNamerTest.cs | 0 .../Internal}/CandidateNamingServiceTest.cs | 0 .../Internal}/NullPluralizerTest.cs | 0 .../RelationalScaffoldingModelFactoryTest.cs | 6 +- .../ScaffoldingMetadataExtenstionsTest.cs | 0 .../ApiConsistencyTest.cs | 14 - .../EFCore.Relational.Design.Tests.csproj | 35 - .../RelationalDesignEventIdTest.cs | 31 - .../RelationalEventIdTest.cs | 1 + .../ReverseEngineering/SqlServerE2ETests.cs | 36 +- .../ReverseEngineering/SqliteE2ETestBase.cs | 10 +- .../SqliteScaffoldingModelFactoryTest.cs | 4 +- .../AppDomainOperationExecutorTest.cs | 4 - test/ef.Tests/SimpleProjectTest.cs | 1 - 54 files changed, 1619 insertions(+), 5258 deletions(-) create mode 100644 src/EFCore.Design/Diagnostics/DesignEventId.cs rename src/{EFCore.Relational.Design => EFCore.Design}/Infrastructure/IPluralizer.cs (100%) create mode 100644 src/EFCore.Design/Internal/DesignLoggerExtensions.cs rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding}/Internal/CSharpNamer.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding}/Internal/CSharpUniqueNamer.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding}/Internal/CSharpUtilities.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding}/Internal/CandidateNamingService.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding/Internal}/IScaffoldingModelFactory.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding}/Internal/NullPluralizer.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Design/Scaffolding/Internal}/RelationalScaffoldingModelFactory.cs (99%) delete mode 100644 src/EFCore.Relational.Design/Diagnostics/RelationalDesignEventId.cs delete mode 100644 src/EFCore.Relational.Design/EFCore.Relational.Design.csproj delete mode 100644 src/EFCore.Relational.Design/Internal/RelationalDesignLoggerExtensions.cs delete mode 100644 src/EFCore.Relational.Design/Properties/InternalsVisibleTo.cs delete mode 100644 src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs delete mode 100644 src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.tt delete mode 100644 src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx delete mode 100644 src/EFCore.Relational.Design/baseline.netcore.json delete mode 100644 src/EFCore.Relational.Design/breakingchanges.netcore.json rename src/{EFCore.Relational.Design/Internal => EFCore.Relational/Scaffolding}/DbDataReaderExtension.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/IDatabaseModelFactory.cs (100%) rename src/{EFCore.Relational.Design => EFCore.Relational/Scaffolding}/TableSelectionSet.cs (100%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/CSharpNamerTest.cs (100%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/CSharpUniqueNamerTest.cs (100%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/CandidateNamingServiceTest.cs (100%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/NullPluralizerTest.cs (100%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/RelationalScaffoldingModelFactoryTest.cs (99%) rename test/{EFCore.Relational.Design.Tests => EFCore.Design.Tests/Scaffolding/Internal}/ScaffoldingMetadataExtenstionsTest.cs (100%) delete mode 100644 test/EFCore.Relational.Design.Tests/ApiConsistencyTest.cs delete mode 100644 test/EFCore.Relational.Design.Tests/EFCore.Relational.Design.Tests.csproj delete mode 100644 test/EFCore.Relational.Design.Tests/RelationalDesignEventIdTest.cs diff --git a/EFCore.sln b/EFCore.sln index e85efa72e63..e0056d37177 100644 --- a/EFCore.sln +++ b/EFCore.sln @@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational", "src\EF EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Core", "src\EFCore.Sqlite.Core\EFCore.Sqlite.Core.csproj", "{A257C01B-BB91-44BA-831C-1E04F7800AC8}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Design", "src\EFCore.Relational.Design\EFCore.Relational.Design.csproj", "{1942C281-C12B-4818-8CC8-C42842871FF5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.SqlServer", "src\EFCore.SqlServer\EFCore.SqlServer.csproj", "{99595B81-D47C-40BA-8C61-5328A5A0E4AB}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.CrossStore.FunctionalTests", "test\EFCore.CrossStore.FunctionalTests\EFCore.CrossStore.FunctionalTests.csproj", "{7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0}" @@ -25,8 +23,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.InMemory.FunctionalT EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.InMemory.Tests", "test\EFCore.InMemory.Tests\EFCore.InMemory.Tests.csproj", "{AB8D4BD7-8AB6-4004-AF21-32790EED93BC}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Design.Tests", "test\EFCore.Relational.Design.Tests\EFCore.Relational.Design.Tests.csproj", "{47DCCE35-C7FD-4E53-A0F9-BB8A7226978C}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Relational.Tests", "test\EFCore.Relational.Tests\EFCore.Relational.Tests.csproj", "{1A884122-DC9E-42B1-8821-E43340F954D1}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EFCore.Sqlite.Design.FunctionalTests", "test\EFCore.Sqlite.Design.FunctionalTests\EFCore.Sqlite.Design.FunctionalTests.csproj", "{2A62F6C9-B7F3-443B-A253-931D38879A9C}" @@ -99,10 +95,6 @@ Global {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Debug|Any CPU.Build.0 = Debug|Any CPU {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Release|Any CPU.ActiveCfg = Release|Any CPU {A257C01B-BB91-44BA-831C-1E04F7800AC8}.Release|Any CPU.Build.0 = Release|Any CPU - {1942C281-C12B-4818-8CC8-C42842871FF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1942C281-C12B-4818-8CC8-C42842871FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1942C281-C12B-4818-8CC8-C42842871FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1942C281-C12B-4818-8CC8-C42842871FF5}.Release|Any CPU.Build.0 = Release|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Debug|Any CPU.Build.0 = Debug|Any CPU {99595B81-D47C-40BA-8C61-5328A5A0E4AB}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -119,10 +111,6 @@ Global {AB8D4BD7-8AB6-4004-AF21-32790EED93BC}.Debug|Any CPU.Build.0 = Debug|Any CPU {AB8D4BD7-8AB6-4004-AF21-32790EED93BC}.Release|Any CPU.ActiveCfg = Release|Any CPU {AB8D4BD7-8AB6-4004-AF21-32790EED93BC}.Release|Any CPU.Build.0 = Release|Any CPU - {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C}.Release|Any CPU.Build.0 = Release|Any CPU {1A884122-DC9E-42B1-8821-E43340F954D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1A884122-DC9E-42B1-8821-E43340F954D1}.Debug|Any CPU.Build.0 = Debug|Any CPU {1A884122-DC9E-42B1-8821-E43340F954D1}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -232,12 +220,10 @@ Global {6B102CC4-4396-4A7B-9F72-2C6B5C4D8310} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {6A25DF99-2615-46D8-9532-821764647EE1} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {A257C01B-BB91-44BA-831C-1E04F7800AC8} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} - {1942C281-C12B-4818-8CC8-C42842871FF5} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {99595B81-D47C-40BA-8C61-5328A5A0E4AB} = {CE6B50B2-34AE-44C9-940A-4E48C3E1B3BC} {7EAC2B8E-4AF6-40D2-95C0-A6662762A7E0} = {258D5057-81B9-40EC-A872-D21E27452749} {305B30D3-0E30-46E9-BA9D-060E0B79BE98} = {258D5057-81B9-40EC-A872-D21E27452749} {AB8D4BD7-8AB6-4004-AF21-32790EED93BC} = {258D5057-81B9-40EC-A872-D21E27452749} - {47DCCE35-C7FD-4E53-A0F9-BB8A7226978C} = {258D5057-81B9-40EC-A872-D21E27452749} {1A884122-DC9E-42B1-8821-E43340F954D1} = {258D5057-81B9-40EC-A872-D21E27452749} {2A62F6C9-B7F3-443B-A253-931D38879A9C} = {258D5057-81B9-40EC-A872-D21E27452749} {7BB7D051-56D7-4A40-A29E-3801F5C19239} = {258D5057-81B9-40EC-A872-D21E27452749} diff --git a/src/EFCore.Design/Diagnostics/DesignEventId.cs b/src/EFCore.Design/Diagnostics/DesignEventId.cs new file mode 100644 index 00000000000..f4bc2c0dcc7 --- /dev/null +++ b/src/EFCore.Design/Diagnostics/DesignEventId.cs @@ -0,0 +1,95 @@ +// 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 System.Diagnostics; +using Microsoft.Extensions.Logging; + +namespace Microsoft.EntityFrameworkCore.Diagnostics +{ + /// + /// + /// Event IDs for design events that correspond to messages logged to an + /// and events sent to a . + /// + /// + /// These IDs are also used with to configure the + /// behavior of warnings. + /// + /// + public static class DesignEventId + { + // Warning: These values must not change between releases. + // Only add new values to the end of sections, never in the middle. + // Try to use naming and be consistent with existing names. + private enum Id + { + // Scaffolding warning events + MissingSchemaWarning = CoreEventId.CoreDesignBaseId, + SequenceTypeNotSupportedWarning, + UnableToGenerateEntityTypeWarning, + ColumnTypeNotMappedWarning, + MissingPrimaryKeyWarning, + PrimaryKeyColumnsNotMappedWarning, + ForeignKeyReferencesNotMappedTableWarning, + ForeignKeyReferencesMissingPrincipalKeyWarning, + ForeignKeyPrincipalEndContainsNullableColumnsWarning + } + + private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; + private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); + + /// + /// The database is missing a schema. + /// This event is in the category. + /// + public static readonly EventId MissingSchemaWarning = MakeScaffoldingId(Id.MissingSchemaWarning); + + /// + /// The database has a sequence of a type that is not supported. + /// This event is in the category. + /// + public static readonly EventId SequenceTypeNotSupportedWarning = MakeScaffoldingId(Id.SequenceTypeNotSupportedWarning); + + /// + /// An entity type could not be generated. + /// This event is in the category. + /// + public static readonly EventId UnableToGenerateEntityTypeWarning = MakeScaffoldingId(Id.UnableToGenerateEntityTypeWarning); + + /// + /// A column type could not be mapped. + /// This event is in the category. + /// + public static readonly EventId ColumnTypeNotMappedWarning = MakeScaffoldingId(Id.ColumnTypeNotMappedWarning); + + /// + /// A table is missing a primary key. + /// This event is in the category. + /// + public static readonly EventId MissingPrimaryKeyWarning = MakeScaffoldingId(Id.MissingPrimaryKeyWarning); + + /// + /// Columns in a primary key were not mapped. + /// This event is in the category. + /// + public static readonly EventId PrimaryKeyColumnsNotMappedWarning = MakeScaffoldingId(Id.PrimaryKeyColumnsNotMappedWarning); + + /// + /// A foreign key references a table that was not mapped. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyReferencesNotMappedTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesNotMappedTableWarning); + + /// + /// A foreign key references missing prinicpal key columns. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyReferencesMissingPrincipalKeyWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingPrincipalKeyWarning); + + /// + /// A principal key contains nullable columns. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyPrincipalEndContainsNullableColumnsWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalEndContainsNullableColumnsWarning); + } +} diff --git a/src/EFCore.Design/EFCore.Design.csproj b/src/EFCore.Design/EFCore.Design.csproj index 0241ae653d6..1467a5c20fc 100644 --- a/src/EFCore.Design/EFCore.Design.csproj +++ b/src/EFCore.Design/EFCore.Design.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/EFCore.Relational.Design/Infrastructure/IPluralizer.cs b/src/EFCore.Design/Infrastructure/IPluralizer.cs similarity index 100% rename from src/EFCore.Relational.Design/Infrastructure/IPluralizer.cs rename to src/EFCore.Design/Infrastructure/IPluralizer.cs diff --git a/src/EFCore.Design/Internal/DesignLoggerExtensions.cs b/src/EFCore.Design/Internal/DesignLoggerExtensions.cs new file mode 100644 index 00000000000..427be3ef21b --- /dev/null +++ b/src/EFCore.Design/Internal/DesignLoggerExtensions.cs @@ -0,0 +1,258 @@ +// 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 System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using JetBrains.Annotations; +using Microsoft.EntityFrameworkCore.Diagnostics; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations.Design; +using Microsoft.EntityFrameworkCore.Migrations.Internal; +using Microsoft.EntityFrameworkCore.Migrations.Operations; + +namespace Microsoft.EntityFrameworkCore.Internal +{ + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static class DesignLoggerExtensions + { + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void MissingSchemaWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string schemaName) + { + var definition = DesignStrings.LogMissingSchema; + + definition.Log(diagnostics, schemaName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + SchemaName = schemaName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void SequenceTypeNotSupportedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string sequenceName, + [CanBeNull] string dataTypeName) + { + var definition = DesignStrings.LogBadSequenceType; + + definition.Log(diagnostics, sequenceName, dataTypeName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + SequenceName = sequenceName, + DataTypeName = dataTypeName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void UnableToGenerateEntityTypeWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = DesignStrings.LogUnableToGenerateEntityType; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ColumnTypeNotMappedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string columnName, + [CanBeNull] string dataTypeName) + { + var definition = DesignStrings.LogCannotFindTypeMappingForColumn; + + definition.Log(diagnostics, columnName, dataTypeName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ColumnName = columnName, + DataTypeName = dataTypeName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void MissingPrimaryKeyWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = DesignStrings.LogMissingPrimaryKey; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void PrimaryKeyColumnsNotMappedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName, + [NotNull] IList unmappedColumnNames) + { + var definition = DesignStrings.LogPrimaryKeyErrorPropertyNotFound; + + definition.Log( + diagnostics, + tableName, + string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName, + UnmappedColumnNames = unmappedColumnNames + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyReferencesNotMappedTableWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [NotNull] string principalTableName) + { + var definition = DesignStrings.LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError; + + definition.Log(diagnostics, foreignKeyName, principalTableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + PrincipalTableName = principalTableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyReferencesMissingPrincipalKeyWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [CanBeNull] string principalEntityTypeName, + [NotNull] IList principalColumnNames) + { + var definition = DesignStrings.LogForeignKeyScaffoldErrorPrincipalKeyNotFound; + + definition.Log( + diagnostics, + foreignKeyName, + string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, principalColumnNames), + principalEntityTypeName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + PrincipalEntityTypeName = principalEntityTypeName, + PrincipalColumnNames = principalColumnNames + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyPrincipalEndContainsNullableColumnsWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [CanBeNull] string indexName, + [CanBeNull] IList nullablePropertyNames) + { + var definition = DesignStrings.LogForeignKeyPrincipalEndContainsNullableColumns; + + definition.Log( + diagnostics, + foreignKeyName, + indexName, + nullablePropertyNames.Aggregate((a, b) => a + "," + b)); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + IndexName = indexName, + NullablePropertyNames = nullablePropertyNames + }); + } + } + } +} diff --git a/src/EFCore.Design/Properties/DesignStrings.Designer.cs b/src/EFCore.Design/Properties/DesignStrings.Designer.cs index 64f6bb4d172..545cfc7313e 100644 --- a/src/EFCore.Design/Properties/DesignStrings.Designer.cs +++ b/src/EFCore.Design/Properties/DesignStrings.Designer.cs @@ -460,6 +460,138 @@ public static string FoundContextFactory([CanBeNull] object factory) GetString("FoundContextFactory", nameof(factory)), factory); + /// + /// Metadata model returned should not be null. Provider: {providerTypeName}. + /// + public static string ProviderReturnedNullModel([CanBeNull] object providerTypeName) + => string.Format( + GetString("ProviderReturnedNullModel", nameof(providerTypeName)), + providerTypeName); + + /// + /// No files generated in directory {outputDirectoryName}. The following file(s) already exist and must be made writeable to continue: {readOnlyFiles}. + /// + public static string ReadOnlyFiles([CanBeNull] object outputDirectoryName, [CanBeNull] object readOnlyFiles) + => string.Format( + GetString("ReadOnlyFiles", nameof(outputDirectoryName), nameof(readOnlyFiles)), + outputDirectoryName, readOnlyFiles); + + /// + /// The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. + /// + public static string ExistingFiles([CanBeNull] object outputDirectoryName, [CanBeNull] object existingFiles) + => string.Format( + GetString("ExistingFiles", nameof(outputDirectoryName), nameof(existingFiles)), + outputDirectoryName, existingFiles); + + /// + /// Could not find type mapping for column '{columnName}' with data type '{dateType}'. Skipping column. + /// + public static readonly EventDefinition LogCannotFindTypeMappingForColumn + = new EventDefinition( + DesignEventId.ColumnTypeNotMappedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.ColumnTypeNotMappedWarning, + _resourceManager.GetString("LogCannotFindTypeMappingForColumn"))); + + /// + /// Could not scaffold the foreign key '{foreignKeyName}'. A key for '{columnsList}' was not found in the principal entity type '{principalEntityType}'. + /// + public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalKeyNotFound + = new EventDefinition( + DesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning, + _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalKeyNotFound"))); + + /// + /// Could not scaffold the foreign key '{foreignKeyName}'. The referenced table '{principaltableName}' could not be scaffolded. + /// + public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError + = new EventDefinition( + DesignEventId.ForeignKeyReferencesNotMappedTableWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.ForeignKeyReferencesNotMappedTableWarning, + _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError"))); + + /// + /// Could not scaffold the primary key for '{tableName}'. The following columns in the primary key could not be scaffolded: {columnNames}. + /// + public static readonly EventDefinition LogPrimaryKeyErrorPropertyNotFound + = new EventDefinition( + DesignEventId.PrimaryKeyColumnsNotMappedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.PrimaryKeyColumnsNotMappedWarning, + _resourceManager.GetString("LogPrimaryKeyErrorPropertyNotFound"))); + + /// + /// Unable to identify the primary key for table '{tableName}'. + /// + public static readonly EventDefinition LogMissingPrimaryKey + = new EventDefinition( + DesignEventId.MissingPrimaryKeyWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.MissingPrimaryKeyWarning, + _resourceManager.GetString("LogMissingPrimaryKey"))); + + /// + /// Unable to generate entity type for table '{tableName}'. + /// + public static readonly EventDefinition LogUnableToGenerateEntityType + = new EventDefinition( + DesignEventId.UnableToGenerateEntityTypeWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.UnableToGenerateEntityTypeWarning, + _resourceManager.GetString("LogUnableToGenerateEntityType"))); + + /// + /// For sequence '{sequenceName}'. Unable to scaffold because it uses an unsupported type: '{typeName}'. + /// + public static readonly EventDefinition LogBadSequenceType + = new EventDefinition( + DesignEventId.SequenceTypeNotSupportedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.SequenceTypeNotSupportedWarning, + _resourceManager.GetString("LogBadSequenceType"))); + + /// + /// Unable to find a schema in the database matching the selected schema {schema}. + /// + public static readonly EventDefinition LogMissingSchema + = new EventDefinition( + DesignEventId.MissingSchemaWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.MissingSchemaWarning, + _resourceManager.GetString("LogMissingSchema"))); + + /// + /// The principal end of the foreign key '{foreignKeyName}' is supported by the unique index '{indexName}' and contains the following nullable columns '{columnNames}'. Entity Framework requires the properties representing those columns to be non-nullable. + /// + public static readonly EventDefinition LogForeignKeyPrincipalEndContainsNullableColumns + = new EventDefinition( + DesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + DesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning, + _resourceManager.GetString("LogForeignKeyPrincipalEndContainsNullableColumns"))); + private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); diff --git a/src/EFCore.Design/Properties/DesignStrings.resx b/src/EFCore.Design/Properties/DesignStrings.resx index 14cca28a49b..cb67956ae36 100644 --- a/src/EFCore.Design/Properties/DesignStrings.resx +++ b/src/EFCore.Design/Properties/DesignStrings.resx @@ -297,4 +297,49 @@ Change your target project to the migrations project by using the Package Manage Found IDesignTimeDbContextFactory implementation '{factory}'. + + Metadata model returned should not be null. Provider: {providerTypeName}. + + + No files generated in directory {outputDirectoryName}. The following file(s) already exist and must be made writeable to continue: {readOnlyFiles}. + + + The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. + + + Could not find type mapping for column '{columnName}' with data type '{dateType}'. Skipping column. + Warning DesignEventId.ColumnTypeNotMappedWarning string string + + + Could not scaffold the foreign key '{foreignKeyName}'. A key for '{columnsList}' was not found in the principal entity type '{principalEntityType}'. + Warning DesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning string string string + + + Could not scaffold the foreign key '{foreignKeyName}'. The referenced table '{principaltableName}' could not be scaffolded. + Warning DesignEventId.ForeignKeyReferencesNotMappedTableWarning string string + + + Could not scaffold the primary key for '{tableName}'. The following columns in the primary key could not be scaffolded: {columnNames}. + Warning DesignEventId.PrimaryKeyColumnsNotMappedWarning string string + + + Unable to identify the primary key for table '{tableName}'. + Warning DesignEventId.MissingPrimaryKeyWarning string + + + Unable to generate entity type for table '{tableName}'. + Warning DesignEventId.UnableToGenerateEntityTypeWarning string + + + For sequence '{sequenceName}'. Unable to scaffold because it uses an unsupported type: '{typeName}'. + Warning DesignEventId.SequenceTypeNotSupportedWarning string string + + + Unable to find a schema in the database matching the selected schema {schema}. + Warning DesignEventId.MissingSchemaWarning string + + + The principal end of the foreign key '{foreignKeyName}' is supported by the unique index '{indexName}' and contains the following nullable columns '{columnNames}'. Entity Framework requires the properties representing those columns to be non-nullable. + Warning DesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning string string string + \ No newline at end of file diff --git a/src/EFCore.Relational.Design/Internal/CSharpNamer.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpNamer.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/CSharpNamer.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpNamer.cs diff --git a/src/EFCore.Relational.Design/Internal/CSharpUniqueNamer.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/CSharpUniqueNamer.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpUniqueNamer.cs diff --git a/src/EFCore.Relational.Design/Internal/CSharpUtilities.cs b/src/EFCore.Design/Scaffolding/Internal/CSharpUtilities.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/CSharpUtilities.cs rename to src/EFCore.Design/Scaffolding/Internal/CSharpUtilities.cs diff --git a/src/EFCore.Relational.Design/Internal/CandidateNamingService.cs b/src/EFCore.Design/Scaffolding/Internal/CandidateNamingService.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/CandidateNamingService.cs rename to src/EFCore.Design/Scaffolding/Internal/CandidateNamingService.cs diff --git a/src/EFCore.Relational.Design/IScaffoldingModelFactory.cs b/src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs similarity index 100% rename from src/EFCore.Relational.Design/IScaffoldingModelFactory.cs rename to src/EFCore.Design/Scaffolding/Internal/IScaffoldingModelFactory.cs diff --git a/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs b/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs index a362b3c331f..34bb94b7cae 100644 --- a/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs +++ b/src/EFCore.Design/Scaffolding/Internal/ModelScaffolder.cs @@ -84,7 +84,7 @@ public virtual Task GenerateAsync( if (model == null) { throw new InvalidOperationException( - RelationalDesignStrings.ProviderReturnedNullModel( + DesignStrings.ProviderReturnedNullModel( _factory.GetType().ShortDisplayName())); } @@ -138,7 +138,7 @@ private void CheckOutputFiles( if (readOnlyFiles.Count > 0) { throw new InvalidOperationException( - RelationalDesignStrings.ReadOnlyFiles( + DesignStrings.ReadOnlyFiles( outputPath, string.Join( CultureInfo.CurrentCulture.TextInfo.ListSeparator, readOnlyFiles))); @@ -151,7 +151,7 @@ private void CheckOutputFiles( if (existingFiles.Count > 0) { throw new InvalidOperationException( - RelationalDesignStrings.ExistingFiles( + DesignStrings.ExistingFiles( outputPath, string.Join( CultureInfo.CurrentCulture.TextInfo.ListSeparator, existingFiles))); diff --git a/src/EFCore.Relational.Design/Internal/NullPluralizer.cs b/src/EFCore.Design/Scaffolding/Internal/NullPluralizer.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/NullPluralizer.cs rename to src/EFCore.Design/Scaffolding/Internal/NullPluralizer.cs diff --git a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EFCore.Design/Scaffolding/Internal/RelationalScaffoldingModelFactory.cs similarity index 99% rename from src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs rename to src/EFCore.Design/Scaffolding/Internal/RelationalScaffoldingModelFactory.cs index 7b41f963303..d8305810080 100644 --- a/src/EFCore.Relational.Design/RelationalScaffoldingModelFactory.cs +++ b/src/EFCore.Design/Scaffolding/Internal/RelationalScaffoldingModelFactory.cs @@ -256,7 +256,7 @@ protected virtual EntityTypeBuilder VisitTable([NotNull] ModelBuilder modelBuild if (keyBuilder == null) { - var errorMessage = RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage(table.DisplayName); + var errorMessage = DesignStrings.LogUnableToGenerateEntityType.GenerateMessage(table.DisplayName); Logger.UnableToGenerateEntityTypeWarning(table.DisplayName); var model = modelBuilder.Model; diff --git a/src/EFCore.Relational.Design.Specification.Tests/EFCore.Relational.Design.Specification.Tests.csproj b/src/EFCore.Relational.Design.Specification.Tests/EFCore.Relational.Design.Specification.Tests.csproj index b3488c9b4e5..1118ab2765f 100644 --- a/src/EFCore.Relational.Design.Specification.Tests/EFCore.Relational.Design.Specification.Tests.csproj +++ b/src/EFCore.Relational.Design.Specification.Tests/EFCore.Relational.Design.Specification.Tests.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/EFCore.Relational.Design/Diagnostics/RelationalDesignEventId.cs b/src/EFCore.Relational.Design/Diagnostics/RelationalDesignEventId.cs deleted file mode 100644 index 3447e4ef285..00000000000 --- a/src/EFCore.Relational.Design/Diagnostics/RelationalDesignEventId.cs +++ /dev/null @@ -1,244 +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 System.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Diagnostics -{ - /// - /// - /// Event IDs for relational design events that correspond to messages logged to an - /// and events sent to a . - /// - /// - /// These IDs are also used with to configure the - /// behavior of warnings. - /// - /// - public static class RelationalDesignEventId - { - // Warning: These values must not change between releases. - // Only add new values to the end of sections, never in the middle. - // Try to use naming and be consistent with existing names. - private enum Id - { - // Scaffolding warning events - MissingSchemaWarning = CoreEventId.RelationalDesignBaseId, - MissingTableWarning, - SequenceNotNamedWarning, - SequenceTypeNotSupportedWarning, - UnableToGenerateEntityTypeWarning, - ColumnTypeNotMappedWarning, - MissingPrimaryKeyWarning, - PrimaryKeyColumnsNotMappedWarning, - IndexColumnsNotMappedWarning, - ForeignKeyReferencesMissingTableWarning, - ForeignKeyReferencesMissingPrincipalTableWarning, - ForeignKeyReferencesNotMappedTableWarning, - ForeignKeyColumnsNotMappedWarning, - ForeignKeyReferencesMissingPrincipalKeyWarning, - ForeignKeyPrincipalEndContainsNullableColumnsWarning, - ForeignKeyNotNamedWarning, - ForeignKeyColumnMissingWarning, - ForeignKeyColumnNotNamedWarning, - ForeignKeyPrincipalColumnMissingWarning, - ColumnNotNamedWarning, - IndexNotNamedWarning, - IndexTableMissingWarning, - IndexColumnNotNamedWarning, - - // Scaffolding events - TableFound = CoreEventId.RelationalDesignBaseId + 1000, - TableSkipped, - ColumnSkipped, - IndexFound, - IndexColumnFound, - IndexColumnSkipped, - SequenceFound - } - - private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; - private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); - - /// - /// The database is missing a schema. - /// This event is in the category. - /// - public static readonly EventId MissingSchemaWarning = MakeScaffoldingId(Id.MissingSchemaWarning); - - /// - /// The database is missing a table. - /// This event is in the category. - /// - public static readonly EventId MissingTableWarning = MakeScaffoldingId(Id.MissingTableWarning); - - /// - /// The database has an unnamed sequence. - /// This event is in the category. - /// - public static readonly EventId SequenceNotNamedWarning = MakeScaffoldingId(Id.SequenceNotNamedWarning); - - /// - /// The database has a sequence of a type that is not supported. - /// This event is in the category. - /// - public static readonly EventId SequenceTypeNotSupportedWarning = MakeScaffoldingId(Id.SequenceTypeNotSupportedWarning); - - /// - /// An entity type could not be generated. - /// This event is in the category. - /// - public static readonly EventId UnableToGenerateEntityTypeWarning = MakeScaffoldingId(Id.UnableToGenerateEntityTypeWarning); - - /// - /// A column type could not be mapped. - /// This event is in the category. - /// - public static readonly EventId ColumnTypeNotMappedWarning = MakeScaffoldingId(Id.ColumnTypeNotMappedWarning); - - /// - /// A table is missing a primary key. - /// This event is in the category. - /// - public static readonly EventId MissingPrimaryKeyWarning = MakeScaffoldingId(Id.MissingPrimaryKeyWarning); - - /// - /// Columns in a primary key were not mapped. - /// This event is in the category. - /// - public static readonly EventId PrimaryKeyColumnsNotMappedWarning = MakeScaffoldingId(Id.PrimaryKeyColumnsNotMappedWarning); - - /// - /// Columns in an index were not mapped. - /// This event is in the category. - /// - public static readonly EventId IndexColumnsNotMappedWarning = MakeScaffoldingId(Id.IndexColumnsNotMappedWarning); - - /// - /// A foreign key references a missing table. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyReferencesMissingTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingTableWarning); - - /// - /// A foreign key references a missing table at the principal end. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyReferencesMissingPrincipalTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingPrincipalTableWarning); - - /// - /// A foreign key references a table that was not mapped. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyReferencesNotMappedTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesNotMappedTableWarning); - - /// - /// Columns in a foreign key were not mapped. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyColumnsNotMappedWarning = MakeScaffoldingId(Id.ForeignKeyColumnsNotMappedWarning); - - /// - /// A foreign key references missing prinicpal key columns. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyReferencesMissingPrincipalKeyWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingPrincipalKeyWarning); - - /// - /// A principal key contains nullable columns. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyPrincipalEndContainsNullableColumnsWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalEndContainsNullableColumnsWarning); - - /// - /// A foreign key is not named. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyNotNamedWarning = MakeScaffoldingId(Id.ForeignKeyNotNamedWarning); - - /// - /// A foreign key column was not found. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyColumnMissingWarning); - - /// - /// A column referenced by a foreign key constraint was not found. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyPrincipalColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalColumnMissingWarning); - - /// - /// A foreign key column was not named. - /// This event is in the category. - /// - public static readonly EventId ForeignKeyColumnNotNamedWarning = MakeScaffoldingId(Id.ForeignKeyColumnNotNamedWarning); - - /// - /// A column is not named. - /// This event is in the category. - /// - public static readonly EventId ColumnNotNamedWarning = MakeScaffoldingId(Id.ColumnNotNamedWarning); - - /// - /// An index is not named. - /// This event is in the category. - /// - public static readonly EventId IndexNotNamedWarning = MakeScaffoldingId(Id.IndexNotNamedWarning); - - /// - /// The table referened by an index was not found. - /// This event is in the category. - /// - public static readonly EventId IndexTableMissingWarning = MakeScaffoldingId(Id.IndexTableMissingWarning); - - /// - /// An index column was not named. - /// This event is in the category. - /// - public static readonly EventId IndexColumnNotNamedWarning = MakeScaffoldingId(Id.IndexColumnNotNamedWarning); - - /// - /// A table was found. - /// This event is in the category. - /// - public static readonly EventId TableFound = MakeScaffoldingId(Id.TableFound); - - /// - /// A table was skipped. - /// This event is in the category. - /// - public static readonly EventId TableSkipped = MakeScaffoldingId(Id.TableSkipped); - - /// - /// A column was skipped. - /// This event is in the category. - /// - public static readonly EventId ColumnSkipped = MakeScaffoldingId(Id.ColumnSkipped); - - /// - /// An index was found. - /// This event is in the category. - /// - public static readonly EventId IndexFound = MakeScaffoldingId(Id.IndexFound); - - /// - /// An index was skipped. - /// This event is in the category. - /// - public static readonly EventId IndexColumnFound = MakeScaffoldingId(Id.IndexColumnFound); - - /// - /// A column of an index was skipped. - /// This event is in the category. - /// - public static readonly EventId IndexColumnSkipped = MakeScaffoldingId(Id.IndexColumnSkipped); - - /// - /// A sequence was found. - /// This event is in the category. - /// - public static readonly EventId SequenceFound = MakeScaffoldingId(Id.SequenceFound); - } -} diff --git a/src/EFCore.Relational.Design/EFCore.Relational.Design.csproj b/src/EFCore.Relational.Design/EFCore.Relational.Design.csproj deleted file mode 100644 index 72f8ad01da8..00000000000 --- a/src/EFCore.Relational.Design/EFCore.Relational.Design.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - Shared design-time Entity Framework Core components for relational database providers. - netstandard2.0 - Microsoft.EntityFrameworkCore.Relational.Design - Microsoft.EntityFrameworkCore - $(NoWarn);CS1591 - true - ..\EFCore.ruleset - - - - - - - - - - - - - TextTemplatingFileGenerator - RelationalDesignStrings.Designer.cs - - - - - - - - - - True - True - RelationalDesignStrings.Designer.tt - - - - - - Microsoft.EntityFrameworkCore.Internal - - - - - - - - diff --git a/src/EFCore.Relational.Design/Internal/RelationalDesignLoggerExtensions.cs b/src/EFCore.Relational.Design/Internal/RelationalDesignLoggerExtensions.cs deleted file mode 100644 index fcf00ceb288..00000000000 --- a/src/EFCore.Relational.Design/Internal/RelationalDesignLoggerExtensions.cs +++ /dev/null @@ -1,809 +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 System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class RelationalDesignLoggerExtensions - { - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void MissingSchemaWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string schemaName) - { - var definition = RelationalDesignStrings.LogMissingSchema; - - definition.Log(diagnostics, schemaName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - SchemaName = schemaName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void MissingTableWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogMissingTable; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void SequenceNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics) - { - var definition = RelationalDesignStrings.LogSequencesRequireName; - - definition.Log(diagnostics); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write(definition.EventId.Name, null); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void SequenceTypeNotSupportedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string sequenceName, - [CanBeNull] string dataTypeName) - { - var definition = RelationalDesignStrings.LogBadSequenceType; - - definition.Log(diagnostics, sequenceName, dataTypeName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - SequenceName = sequenceName, - DataTypeName = dataTypeName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void UnableToGenerateEntityTypeWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogUnableToGenerateEntityType; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ColumnTypeNotMappedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string columnName, - [CanBeNull] string dataTypeName) - { - var definition = RelationalDesignStrings.LogCannotFindTypeMappingForColumn; - - definition.Log(diagnostics, columnName, dataTypeName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ColumnName = columnName, - DataTypeName = dataTypeName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void MissingPrimaryKeyWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogMissingPrimaryKey; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void PrimaryKeyColumnsNotMappedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName, - [NotNull] IList unmappedColumnNames) - { - var definition = RelationalDesignStrings.LogPrimaryKeyErrorPropertyNotFound; - - definition.Log( - diagnostics, - tableName, - string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName, - UnmappedColumnNames = unmappedColumnNames - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexColumnsNotMappedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string indexName, - [NotNull] IList unmappedColumnNames) - { - var definition = RelationalDesignStrings.LogUnableToScaffoldIndexMissingProperty; - - definition.Log( - diagnostics, - indexName, - string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - IndexName = indexName, - UnmappedColumnNames = unmappedColumnNames - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyReferencesMissingTableWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName) - { - var definition = RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalTableNotFound; - - definition.Log(diagnostics, foreignKeyName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyReferencesNotMappedTableWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [NotNull] string principalTableName) - { - var definition = RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError; - - definition.Log(diagnostics, foreignKeyName, principalTableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - PrincipalTableName = principalTableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyColumnsNotMappedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [NotNull] IList unmappedColumnNames) - { - var definition = RelationalDesignStrings.LogForeignKeyScaffoldErrorPropertyNotFound; - - definition.Log( - diagnostics, - foreignKeyName, - string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - UnmappedColumnNames = unmappedColumnNames - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyReferencesMissingPrincipalKeyWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [CanBeNull] string principalEntityTypeName, - [NotNull] IList principalColumnNames) - { - var definition = RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalKeyNotFound; - - definition.Log( - diagnostics, - foreignKeyName, - string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, principalColumnNames), - principalEntityTypeName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - PrincipalEntityTypeName = principalEntityTypeName, - PrincipalColumnNames = principalColumnNames - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyPrincipalEndContainsNullableColumnsWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [CanBeNull] string indexName, - [CanBeNull] IList nullablePropertyNames) - { - var definition = RelationalDesignStrings.LogForeignKeyPrincipalEndContainsNullableColumns; - - definition.Log( - diagnostics, - foreignKeyName, - indexName, - nullablePropertyNames.Aggregate((a, b) => a + "," + b)); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - IndexName = indexName, - NullablePropertyNames = nullablePropertyNames - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void SequenceFound( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string sequenceName, - [CanBeNull] string sequenceTypeName, - bool? cyclic, - int? increment, - long? start, - long? min, - long? max) - { - var definition = RelationalDesignStrings.LogFoundSequence; - - Debug.Assert(LogLevel.Debug == definition.Level); - - if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) - { - definition.Log( - diagnostics, - l => l.LogDebug( - definition.EventId, - null, - definition.MessageFormat, - sequenceName, - sequenceTypeName, - cyclic, - increment, - start, - min, - max)); - } - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - SequenceName = sequenceName, - SequenceTypeName = sequenceTypeName, - Cyclic = cyclic, - Increment = increment, - Start = start, - Min = min, - Max = max - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void TableFound( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogFoundTable; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void TableSkipped( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogTableNotInSelectionSet; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ColumnSkipped( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName, - [CanBeNull] string columnName) - { - var definition = RelationalDesignStrings.LogColumnNotInSelectionSet; - - definition.Log(diagnostics, columnName, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName, - ColumnName = columnName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexColumnFound( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName, - [CanBeNull] string indexName, - bool? unique, - [CanBeNull] string columnName, - int? ordinal) - { - var definition = RelationalDesignStrings.LogFoundIndexColumn; - - definition.Log(diagnostics, indexName, tableName, columnName, ordinal); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName, - IndexName = indexName, - Unique = unique, - ColumnName = columnName, - Ordinal = ordinal - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ColumnNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogColumnNameEmptyOnTable; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexColumnSkipped( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName, - [CanBeNull] string indexName, - [CanBeNull] string columnName) - { - var definition = RelationalDesignStrings.LogIndexColumnNotInSelectionSet; - - definition.Log(diagnostics, columnName, indexName, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName, - IndexName = indexName, - ColumnName = columnName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogIndexNameEmpty; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexTableMissingWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string indexName, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogUnableToFindTableForIndex; - - definition.Log(diagnostics, indexName, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - IndexName = indexName, - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexColumnNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string indexName, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogColumnNameEmptyOnIndex; - - definition.Log(diagnostics, indexName, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - IndexName = indexName, - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogForeignKeyNameEmpty; - - definition.Log(diagnostics, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyColumnMissingWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string columnName, - [CanBeNull] string foreignKeyName, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogForeignKeyColumnNotInSelectionSet; - - definition.Log(diagnostics, columnName, foreignKeyName, tableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ColumnName = columnName, - ForeignKeyName = foreignKeyName, - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyReferencesMissingPrincipalTableWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [CanBeNull] string tableName, - [CanBeNull] string principalTableName) - { - var definition = RelationalDesignStrings.LogPrincipalTableNotInSelectionSet; - - definition.Log(diagnostics, foreignKeyName, tableName, principalTableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - TableName = tableName, - PrincipalTableName = principalTableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyColumnNotNamedWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [CanBeNull] string tableName) - { - var definition = RelationalDesignStrings.LogColumnNameEmptyOnForeignKey; - - definition.Log(diagnostics, tableName, foreignKeyName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - TableName = tableName - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void IndexFound( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string indexName, - [CanBeNull] string tableName, - bool? unique) - { - var definition = RelationalDesignStrings.LogFoundIndex; - - definition.Log(diagnostics, indexName, tableName, unique); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - IndexName = indexName, - TableName = tableName, - Unique = unique - }); - } - } - - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static void ForeignKeyPrincipalColumnMissingWarning( - [NotNull] this IDiagnosticsLogger diagnostics, - [CanBeNull] string foreignKeyName, - [CanBeNull] string tableName, - [CanBeNull] string principalColumnName, - [CanBeNull] string principalTableName) - { - var definition = RelationalDesignStrings.LogPrincipalColumnNotFound; - - definition.Log(diagnostics, foreignKeyName, tableName, principalColumnName, principalTableName); - - if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) - { - diagnostics.DiagnosticSource.Write( - definition.EventId.Name, - new - { - ForeignKeyName = foreignKeyName, - TableName = tableName, - PrincipalColumnName = principalColumnName, - PrincipalTableName = principalTableName - }); - } - } - } -} diff --git a/src/EFCore.Relational.Design/Properties/InternalsVisibleTo.cs b/src/EFCore.Relational.Design/Properties/InternalsVisibleTo.cs deleted file mode 100644 index effd6c66d76..00000000000 --- a/src/EFCore.Relational.Design/Properties/InternalsVisibleTo.cs +++ /dev/null @@ -1,10 +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 System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Microsoft.EntityFrameworkCore.Relational.Design.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] - -// for Moq - -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs deleted file mode 100644 index 74a7f020016..00000000000 --- a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.cs +++ /dev/null @@ -1,413 +0,0 @@ -// - -using System; -using System.Reflection; -using System.Resources; -using JetBrains.Annotations; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.Extensions.Logging; - -namespace Microsoft.EntityFrameworkCore.Internal -{ - /// - /// This API supports the Entity Framework Core infrastructure and is not intended to be used - /// directly from your code. This API may change or be removed in future releases. - /// - public static class RelationalDesignStrings - { - private static readonly ResourceManager _resourceManager - = new ResourceManager("Microsoft.EntityFrameworkCore.Properties.RelationalDesignStrings", typeof(RelationalDesignStrings).GetTypeInfo().Assembly); - - /// - /// Metadata model returned should not be null. Provider: {providerTypeName}. - /// - public static string ProviderReturnedNullModel([CanBeNull] object providerTypeName) - => string.Format( - GetString("ProviderReturnedNullModel", nameof(providerTypeName)), - providerTypeName); - - /// - /// No files generated in directory {outputDirectoryName}. The following file(s) already exist and must be made writeable to continue: {readOnlyFiles}. - /// - public static string ReadOnlyFiles([CanBeNull] object outputDirectoryName, [CanBeNull] object readOnlyFiles) - => string.Format( - GetString("ReadOnlyFiles", nameof(outputDirectoryName), nameof(readOnlyFiles)), - outputDirectoryName, readOnlyFiles); - - /// - /// The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. - /// - public static string ExistingFiles([CanBeNull] object outputDirectoryName, [CanBeNull] object existingFiles) - => string.Format( - GetString("ExistingFiles", nameof(outputDirectoryName), nameof(existingFiles)), - outputDirectoryName, existingFiles); - - /// - /// Found a column on index {indexName} on table {tableName} with an empty or null name. Not including column in index. - /// - public static readonly EventDefinition LogColumnNameEmptyOnIndex - = new EventDefinition( - RelationalDesignEventId.IndexColumnNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.IndexColumnNotNamedWarning, - _resourceManager.GetString("LogColumnNameEmptyOnIndex"))); - - /// - /// For foreign key with identity {id} on table {tableName}, unable to find the column called {principalColumnName} on the foreign key's principal table, {principaltableName}. Skipping foreign key. - /// - public static readonly EventDefinition LogPrincipalColumnNotFound - = new EventDefinition( - RelationalDesignEventId.ForeignKeyPrincipalColumnMissingWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyPrincipalColumnMissingWarning, - _resourceManager.GetString("LogPrincipalColumnNotFound"))); - - /// - /// Could not find type mapping for column '{columnName}' with data type '{dateType}'. Skipping column. - /// - public static readonly EventDefinition LogCannotFindTypeMappingForColumn - = new EventDefinition( - RelationalDesignEventId.ColumnTypeNotMappedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ColumnTypeNotMappedWarning, - _resourceManager.GetString("LogCannotFindTypeMappingForColumn"))); - - /// - /// Could not scaffold the foreign key '{foreignKeyName}'. A key for '{columnsList}' was not found in the principal entity type '{principalEntityType}'. - /// - public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalKeyNotFound - = new EventDefinition( - RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning, - _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalKeyNotFound"))); - - /// - /// Could not scaffold the foreign key '{foreignKeyName}'. The referenced table could not be found. This most likely occurred because the referenced table was excluded from scaffolding. - /// - public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalTableNotFound - = new EventDefinition( - RelationalDesignEventId.ForeignKeyReferencesMissingTableWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyReferencesMissingTableWarning, - _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalTableNotFound"))); - - /// - /// Could not scaffold the foreign key '{foreignKeyName}'. The referenced table '{principaltableName}' could not be scaffolded. - /// - public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError - = new EventDefinition( - RelationalDesignEventId.ForeignKeyReferencesNotMappedTableWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyReferencesNotMappedTableWarning, - _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError"))); - - /// - /// Could not scaffold the foreign key '{foreignKeyName}'. The following columns in the foreign key could not be scaffolded: {columnNames}. - /// - public static readonly EventDefinition LogForeignKeyScaffoldErrorPropertyNotFound - = new EventDefinition( - RelationalDesignEventId.ForeignKeyColumnsNotMappedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyColumnsNotMappedWarning, - _resourceManager.GetString("LogForeignKeyScaffoldErrorPropertyNotFound"))); - - /// - /// Could not scaffold the primary key for '{tableName}'. The following columns in the primary key could not be scaffolded: {columnNames}. - /// - public static readonly EventDefinition LogPrimaryKeyErrorPropertyNotFound - = new EventDefinition( - RelationalDesignEventId.PrimaryKeyColumnsNotMappedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.PrimaryKeyColumnsNotMappedWarning, - _resourceManager.GetString("LogPrimaryKeyErrorPropertyNotFound"))); - - /// - /// Unable to identify the primary key for table '{tableName}'. - /// - public static readonly EventDefinition LogMissingPrimaryKey - = new EventDefinition( - RelationalDesignEventId.MissingPrimaryKeyWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.MissingPrimaryKeyWarning, - _resourceManager.GetString("LogMissingPrimaryKey"))); - - /// - /// Found table with name: {name}. - /// - public static readonly EventDefinition LogFoundTable - = new EventDefinition( - RelationalDesignEventId.TableFound, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - RelationalDesignEventId.TableFound, - _resourceManager.GetString("LogFoundTable"))); - - /// - /// Table {tableName} is not included in the selection set. Skipping. - /// - public static readonly EventDefinition LogTableNotInSelectionSet - = new EventDefinition( - RelationalDesignEventId.TableSkipped, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - RelationalDesignEventId.TableSkipped, - _resourceManager.GetString("LogTableNotInSelectionSet"))); - - /// - /// Column {columnName} belongs to table {tableName} which is not included in the selection set. Skipping. - /// - public static readonly EventDefinition LogColumnNotInSelectionSet - = new EventDefinition( - RelationalDesignEventId.ColumnSkipped, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - RelationalDesignEventId.ColumnSkipped, - _resourceManager.GetString("LogColumnNotInSelectionSet"))); - - /// - /// Found index with name: {indexName}, table: {tableName}, is unique: {isUnique}. - /// - public static readonly EventDefinition LogFoundIndex - = new EventDefinition( - RelationalDesignEventId.IndexFound, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - RelationalDesignEventId.IndexFound, - _resourceManager.GetString("LogFoundIndex"))); - - /// - /// Found index column on index {indexName} on table {tableName}, column name: {columnName}, ordinal: {ordinal}. - /// - public static readonly EventDefinition LogFoundIndexColumn - = new EventDefinition( - RelationalDesignEventId.IndexColumnFound, - LogLevel.Debug, - LoggerMessage.Define( - LogLevel.Debug, - RelationalDesignEventId.IndexColumnFound, - _resourceManager.GetString("LogFoundIndexColumn"))); - - /// - /// Index column {columnName} belongs to index {indexName} on table {tableName} which is not included in the selection set. Skipping. - /// - public static readonly EventDefinition LogIndexColumnNotInSelectionSet - = new EventDefinition( - RelationalDesignEventId.IndexColumnSkipped, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.IndexColumnSkipped, - _resourceManager.GetString("LogIndexColumnNotInSelectionSet"))); - - /// - /// Found sequence name: {name}, data type: {dataType}, cyclic: {isCyclic}, increment: {increment}, start: {start}, minimum: {min}, maximum: {max}. - /// - public static readonly FallbackEventDefinition LogFoundSequence - = new FallbackEventDefinition( - RelationalDesignEventId.SequenceFound, - LogLevel.Debug, - _resourceManager.GetString("LogFoundSequence")); - - /// - /// Found a column on foreign key {tableName}.{fkName} with an empty or null name. Not including column in foreign key - /// - public static readonly EventDefinition LogColumnNameEmptyOnForeignKey - = new EventDefinition( - RelationalDesignEventId.ForeignKeyColumnNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyColumnNotNamedWarning, - _resourceManager.GetString("LogColumnNameEmptyOnForeignKey"))); - - /// - /// Found a column on table {tableName} with an empty or null name. Skipping column. - /// - public static readonly EventDefinition LogColumnNameEmptyOnTable - = new EventDefinition( - RelationalDesignEventId.ColumnNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ColumnNotNamedWarning, - _resourceManager.GetString("LogColumnNameEmptyOnTable"))); - - /// - /// For index {indexName}. Unable to find parent table {tableName}. Skipping index. - /// - public static readonly EventDefinition LogUnableToFindTableForIndex - = new EventDefinition( - RelationalDesignEventId.IndexTableMissingWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.IndexTableMissingWarning, - _resourceManager.GetString("LogUnableToFindTableForIndex"))); - - /// - /// Found an index on table {tableName} with an empty or null name. Skipping index. - /// - public static readonly EventDefinition LogIndexNameEmpty - = new EventDefinition( - RelationalDesignEventId.IndexNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.IndexNotNamedWarning, - _resourceManager.GetString("LogIndexNameEmpty"))); - - /// - /// Found a foreign key on table {tableName} with an empty or null name. Skipping foreign key. - /// - public static readonly EventDefinition LogForeignKeyNameEmpty - = new EventDefinition( - RelationalDesignEventId.ForeignKeyNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyNotNamedWarning, - _resourceManager.GetString("LogForeignKeyNameEmpty"))); - - /// - /// Foreign key column {columnName} belongs to foreign key {fkName} on table {tableName} which is not included in the selection set. Skipping. - /// - public static readonly EventDefinition LogForeignKeyColumnNotInSelectionSet - = new EventDefinition( - RelationalDesignEventId.ForeignKeyColumnMissingWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyColumnMissingWarning, - _resourceManager.GetString("LogForeignKeyColumnNotInSelectionSet"))); - - /// - /// For foreign key {fkName} on table {tableName}, unable to model the end of the foreign key on principal table {principaltableName}. This is usually because the principal table was not included in the selection set. - /// - public static readonly EventDefinition LogPrincipalTableNotInSelectionSet - = new EventDefinition( - RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalTableWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalTableWarning, - _resourceManager.GetString("LogPrincipalTableNotInSelectionSet"))); - - /// - /// Unable to generate entity type for table '{tableName}'. - /// - public static readonly EventDefinition LogUnableToGenerateEntityType - = new EventDefinition( - RelationalDesignEventId.UnableToGenerateEntityTypeWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.UnableToGenerateEntityTypeWarning, - _resourceManager.GetString("LogUnableToGenerateEntityType"))); - - /// - /// Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}. - /// - public static readonly EventDefinition LogUnableToScaffoldIndexMissingProperty - = new EventDefinition( - RelationalDesignEventId.IndexColumnsNotMappedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.IndexColumnsNotMappedWarning, - _resourceManager.GetString("LogUnableToScaffoldIndexMissingProperty"))); - - /// - /// Sequence name cannot be null or empty. Entity Framework cannot model a sequence that does not have a name. - /// - public static readonly EventDefinition LogSequencesRequireName - = new EventDefinition( - RelationalDesignEventId.SequenceNotNamedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.SequenceNotNamedWarning, - _resourceManager.GetString("LogSequencesRequireName"))); - - /// - /// For sequence '{sequenceName}'. Unable to scaffold because it uses an unsupported type: '{typeName}'. - /// - public static readonly EventDefinition LogBadSequenceType - = new EventDefinition( - RelationalDesignEventId.SequenceTypeNotSupportedWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.SequenceTypeNotSupportedWarning, - _resourceManager.GetString("LogBadSequenceType"))); - - /// - /// Unable to find a schema in the database matching the selected schema {schema}. - /// - public static readonly EventDefinition LogMissingSchema - = new EventDefinition( - RelationalDesignEventId.MissingSchemaWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.MissingSchemaWarning, - _resourceManager.GetString("LogMissingSchema"))); - - /// - /// Unable to find a table in the database matching the selected table {table}. - /// - public static readonly EventDefinition LogMissingTable - = new EventDefinition( - RelationalDesignEventId.MissingTableWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.MissingTableWarning, - _resourceManager.GetString("LogMissingTable"))); - - /// - /// The principal end of the foreign key '{foreignKeyName}' is supported by the unique index '{indexName}' and contains the following nullable columns '{columnNames}'. Entity Framework requires the properties representing those columns to be non-nullable. - /// - public static readonly EventDefinition LogForeignKeyPrincipalEndContainsNullableColumns - = new EventDefinition( - RelationalDesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning, - LogLevel.Warning, - LoggerMessage.Define( - LogLevel.Warning, - RelationalDesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning, - _resourceManager.GetString("LogForeignKeyPrincipalEndContainsNullableColumns"))); - - private static string GetString(string name, params string[] formatterNames) - { - var value = _resourceManager.GetString(name); - for (var i = 0; i < formatterNames.Length; i++) - { - value = value.Replace("{" + formatterNames[i] + "}", "{" + i + "}"); - } - - return value; - } - } -} diff --git a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.tt b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.tt deleted file mode 100644 index 673499d875b..00000000000 --- a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.Designer.tt +++ /dev/null @@ -1,4 +0,0 @@ -<# - Session["ResourceFile"] = "RelationalDesignStrings.resx"; -#> -<#@ include file="..\..\..\tools\Resources.tt" #> \ No newline at end of file diff --git a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx b/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx deleted file mode 100644 index 4b52ead0d25..00000000000 --- a/src/EFCore.Relational.Design/Properties/RelationalDesignStrings.resx +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Metadata model returned should not be null. Provider: {providerTypeName}. - - - No files generated in directory {outputDirectoryName}. The following file(s) already exist and must be made writeable to continue: {readOnlyFiles}. - - - The following file(s) already exist in directory {outputDirectoryName}: {existingFiles}. Use the Force flag to overwrite these files. - - - Found a column on index {indexName} on table {tableName} with an empty or null name. Not including column in index. - Warning RelationalDesignEventId.IndexColumnNotNamedWarning string string - - - For foreign key with identity {id} on table {tableName}, unable to find the column called {principalColumnName} on the foreign key's principal table, {principaltableName}. Skipping foreign key. - Warning RelationalDesignEventId.ForeignKeyPrincipalColumnMissingWarning string string string string - - - Could not find type mapping for column '{columnName}' with data type '{dateType}'. Skipping column. - Warning RelationalDesignEventId.ColumnTypeNotMappedWarning string string - - - Could not scaffold the foreign key '{foreignKeyName}'. A key for '{columnsList}' was not found in the principal entity type '{principalEntityType}'. - Warning RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalKeyWarning string string string - - - Could not scaffold the foreign key '{foreignKeyName}'. The referenced table could not be found. This most likely occurred because the referenced table was excluded from scaffolding. - Warning RelationalDesignEventId.ForeignKeyReferencesMissingTableWarning string - - - Could not scaffold the foreign key '{foreignKeyName}'. The referenced table '{principaltableName}' could not be scaffolded. - Warning RelationalDesignEventId.ForeignKeyReferencesNotMappedTableWarning string string - - - Could not scaffold the foreign key '{foreignKeyName}'. The following columns in the foreign key could not be scaffolded: {columnNames}. - Warning RelationalDesignEventId.ForeignKeyColumnsNotMappedWarning string string - - - Could not scaffold the primary key for '{tableName}'. The following columns in the primary key could not be scaffolded: {columnNames}. - Warning RelationalDesignEventId.PrimaryKeyColumnsNotMappedWarning string string - - - Unable to identify the primary key for table '{tableName}'. - Warning RelationalDesignEventId.MissingPrimaryKeyWarning string - - - Found table with name: {name}. - Debug RelationalDesignEventId.TableFound string - - - Table {tableName} is not included in the selection set. Skipping. - Debug RelationalDesignEventId.TableSkipped string - - - Column {columnName} belongs to table {tableName} which is not included in the selection set. Skipping. - Debug RelationalDesignEventId.ColumnSkipped string string - - - Found index with name: {indexName}, table: {tableName}, is unique: {isUnique}. - Debug RelationalDesignEventId.IndexFound string string bool? - - - Found index column on index {indexName} on table {tableName}, column name: {columnName}, ordinal: {ordinal}. - Debug RelationalDesignEventId.IndexColumnFound string string string int? - - - Index column {columnName} belongs to index {indexName} on table {tableName} which is not included in the selection set. Skipping. - Warning RelationalDesignEventId.IndexColumnSkipped string string string - - - Found sequence name: {name}, data type: {dataType}, cyclic: {isCyclic}, increment: {increment}, start: {start}, minimum: {min}, maximum: {max}. - Debug RelationalDesignEventId.SequenceFound string string bool? int? long? long? long? - - - Found a column on foreign key {tableName}.{fkName} with an empty or null name. Not including column in foreign key - Warning RelationalDesignEventId.ForeignKeyColumnNotNamedWarning string string - - - Found a column on table {tableName} with an empty or null name. Skipping column. - Warning RelationalDesignEventId.ColumnNotNamedWarning string - - - For index {indexName}. Unable to find parent table {tableName}. Skipping index. - Warning RelationalDesignEventId.IndexTableMissingWarning string string - - - Found an index on table {tableName} with an empty or null name. Skipping index. - Warning RelationalDesignEventId.IndexNotNamedWarning string - - - Found a foreign key on table {tableName} with an empty or null name. Skipping foreign key. - Warning RelationalDesignEventId.ForeignKeyNotNamedWarning string - - - Foreign key column {columnName} belongs to foreign key {fkName} on table {tableName} which is not included in the selection set. Skipping. - Warning RelationalDesignEventId.ForeignKeyColumnMissingWarning string string string - - - For foreign key {fkName} on table {tableName}, unable to model the end of the foreign key on principal table {principaltableName}. This is usually because the principal table was not included in the selection set. - Warning RelationalDesignEventId.ForeignKeyReferencesMissingPrincipalTableWarning string string string - - - Unable to generate entity type for table '{tableName}'. - Warning RelationalDesignEventId.UnableToGenerateEntityTypeWarning string - - - Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}. - Warning RelationalDesignEventId.IndexColumnsNotMappedWarning string string - - - Sequence name cannot be null or empty. Entity Framework cannot model a sequence that does not have a name. - Warning RelationalDesignEventId.SequenceNotNamedWarning - - - For sequence '{sequenceName}'. Unable to scaffold because it uses an unsupported type: '{typeName}'. - Warning RelationalDesignEventId.SequenceTypeNotSupportedWarning string string - - - Unable to find a schema in the database matching the selected schema {schema}. - Warning RelationalDesignEventId.MissingSchemaWarning string - - - Unable to find a table in the database matching the selected table {table}. - Warning RelationalDesignEventId.MissingTableWarning string - - - The principal end of the foreign key '{foreignKeyName}' is supported by the unique index '{indexName}' and contains the following nullable columns '{columnNames}'. Entity Framework requires the properties representing those columns to be non-nullable. - Warning RelationalDesignEventId.ForeignKeyPrincipalEndContainsNullableColumnsWarning string string string - - \ No newline at end of file diff --git a/src/EFCore.Relational.Design/baseline.netcore.json b/src/EFCore.Relational.Design/baseline.netcore.json deleted file mode 100644 index b61fd95fe22..00000000000 --- a/src/EFCore.Relational.Design/baseline.netcore.json +++ /dev/null @@ -1,3259 +0,0 @@ -{ - "AssemblyIdentity": "Microsoft.EntityFrameworkCore.Relational.Design, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60", - "Types": [ - { - "Name": "Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Scaffolding", - "Parameters": [ - { - "Name": "model", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Scaffolding", - "Parameters": [ - { - "Name": "property", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IProperty" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingPropertyAnnotations", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Internal.RelationalDesignLoggerExtensions", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "LogWarning", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.RelationalDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "LogDebug", - "Parameters": [ - { - "Name": "logger", - "Type": "Microsoft.Extensions.Logging.ILogger" - }, - { - "Name": "eventId", - "Type": "Microsoft.EntityFrameworkCore.Infrastructure.RelationalDesignEventId" - }, - { - "Name": "formatter", - "Type": "System.Func" - } - ], - "ReturnType": "System.Void", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Internal.RelationalDesignStrings", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "CannotFindTypeMappingForColumn", - "Parameters": [ - { - "Name": "columnName", - "Type": "System.Object" - }, - { - "Name": "dateType", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyScaffoldErrorPrincipalKeyNotFound", - "Parameters": [ - { - "Name": "foreignKeyName", - "Type": "System.Object" - }, - { - "Name": "columnsList", - "Type": "System.Object" - }, - { - "Name": "principalEntityType", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyScaffoldErrorPrincipalTableNotFound", - "Parameters": [ - { - "Name": "foreignKeyName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyScaffoldErrorPrincipalTableScaffoldingError", - "Parameters": [ - { - "Name": "foreignKeyName", - "Type": "System.Object" - }, - { - "Name": "principalTableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ForeignKeyScaffoldErrorPropertyNotFound", - "Parameters": [ - { - "Name": "foreignKeyName", - "Type": "System.Object" - }, - { - "Name": "columnNames", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "PrimaryKeyErrorPropertyNotFound", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - }, - { - "Name": "columnNames", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "MissingPrimaryKey", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ProviderReturnedNullModel", - "Parameters": [ - { - "Name": "providerTypeName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ReadOnlyFiles", - "Parameters": [ - { - "Name": "outputDirectoryName", - "Type": "System.Object" - }, - { - "Name": "readOnlyFiles", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToGenerateEntityType", - "Parameters": [ - { - "Name": "tableName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "UnableToScaffoldIndexMissingProperty", - "Parameters": [ - { - "Name": "indexName", - "Type": "System.Object" - }, - { - "Name": "columnNames", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_MissingUseProviderMethodNameAnnotation", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ExistingFiles", - "Parameters": [ - { - "Name": "outputDirectoryName", - "Type": "System.Object" - }, - { - "Name": "existingFiles", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_SequencesRequireName", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "BadSequenceType", - "Parameters": [ - { - "Name": "sequenceName", - "Type": "System.Object" - }, - { - "Name": "typeName", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "MissingSchema", - "Parameters": [ - { - "Name": "schema", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "MissingTable", - "Parameters": [ - { - "Name": "table", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Infrastructure.RelationalDesignEventId", - "Visibility": "Public", - "Kind": "Enumeration", - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "MissingSchemaWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "1" - }, - { - "Kind": "Field", - "Name": "MissingTableWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "2" - }, - { - "Kind": "Field", - "Name": "SequenceMustBeNamedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "3" - }, - { - "Kind": "Field", - "Name": "SequenceTypeNotSupportedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "4" - }, - { - "Kind": "Field", - "Name": "UnableToGenerateEntityTypeWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "5" - }, - { - "Kind": "Field", - "Name": "ColumnTypeNotMappedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "6" - }, - { - "Kind": "Field", - "Name": "MissingPrimaryKeyWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "7" - }, - { - "Kind": "Field", - "Name": "PrimaryKeyColumnsNotMappedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "8" - }, - { - "Kind": "Field", - "Name": "IndexColumnsNotMappedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "9" - }, - { - "Kind": "Field", - "Name": "ForeignKeyReferencesMissingTableWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "10" - }, - { - "Kind": "Field", - "Name": "ForeignKeyColumnsNotMappedWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "11" - }, - { - "Kind": "Field", - "Name": "ForeignKeyReferencesMissingPrincipalKeyWarning", - "Parameters": [], - "GenericParameter": [], - "Literal": "12" - }, - { - "Kind": "Field", - "Name": "FoundTable", - "Parameters": [], - "GenericParameter": [], - "Literal": "13" - }, - { - "Kind": "Field", - "Name": "TableSkipped", - "Parameters": [], - "GenericParameter": [], - "Literal": "14" - }, - { - "Kind": "Field", - "Name": "FoundColumn", - "Parameters": [], - "GenericParameter": [], - "Literal": "15" - }, - { - "Kind": "Field", - "Name": "ColumnSkipped", - "Parameters": [], - "GenericParameter": [], - "Literal": "16" - }, - { - "Kind": "Field", - "Name": "FoundIndex", - "Parameters": [], - "GenericParameter": [], - "Literal": "17" - }, - { - "Kind": "Field", - "Name": "FoundIndexColumn", - "Parameters": [], - "GenericParameter": [], - "Literal": "18" - }, - { - "Kind": "Field", - "Name": "IndexColumnSkipped", - "Parameters": [], - "GenericParameter": [], - "Literal": "19" - }, - { - "Kind": "Field", - "Name": "FoundForeignKeyColumn", - "Parameters": [], - "GenericParameter": [], - "Literal": "20" - }, - { - "Kind": "Field", - "Name": "FoundSequence", - "Parameters": [], - "GenericParameter": [], - "Literal": "21" - }, - { - "Kind": "Field", - "Name": "ForeignKeyReferencesMissingTable", - "Parameters": [], - "GenericParameter": [], - "Literal": "22" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory", - "Visibility": "Public", - "Kind": "Interface", - "Abstract": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "Visibility": "Public", - "Kind": "Interface", - "Abstract": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IModel", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory" - ], - "Members": [ - { - "Kind": "Method", - "Name": "get_Logger", - "Parameters": [], - "ReturnType": "Microsoft.Extensions.Logging.ILogger", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_TypeMapper", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_CandidateNamingService", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connectionString", - "Type": "System.String" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IModel", - "Virtual": true, - "ImplementedInterface": "Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "CheckSelectionsMatched", - "Parameters": [ - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "CreateFromDatabaseModel", - "Parameters": [ - { - "Name": "databaseModel", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IModel", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetEntityTypeName", - "Parameters": [ - { - "Name": "table", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetPropertyName", - "Parameters": [ - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitDatabaseModel", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "databaseModel", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.ModelBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitSequences", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "sequences", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.ModelBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitSequence", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "sequence", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.SequenceModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.RelationalSequenceBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitTables", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "tables", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.ModelBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitTable", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "table", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitColumns", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "columns", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitColumn", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetTypeMapping", - "Parameters": [ - { - "Name": "column", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitPrimaryKey", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "table", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.KeyBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitIndexes", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "indexes", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitIndex", - "Parameters": [ - { - "Name": "builder", - "Type": "Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder" - }, - { - "Name": "index", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.Builders.IndexBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitForeignKeys", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "foreignKeys", - "Type": "System.Collections.Generic.IList" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.ModelBuilder", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "VisitForeignKey", - "Parameters": [ - { - "Name": "modelBuilder", - "Type": "Microsoft.EntityFrameworkCore.ModelBuilder" - }, - { - "Name": "foreignKey", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyModel" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "AddNavigationProperties", - "Parameters": [ - { - "Name": "foreignKey", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "ExistingIdentifiers", - "Parameters": [ - { - "Name": "entityType", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IEntityType" - } - ], - "ReturnType": "System.Collections.Generic.List", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "loggerFactory", - "Type": "Microsoft.Extensions.Logging.ILoggerFactory" - }, - { - "Name": "typeMapper", - "Type": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper" - }, - { - "Name": "databaseModelFactory", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory" - }, - { - "Name": "candidateNamingService", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldingTypeMapper", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_TypeMapper", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper", - "Virtual": true, - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "FindMapping", - "Parameters": [ - { - "Name": "storeType", - "Type": "System.String" - }, - { - "Name": "keyOrIndex", - "Type": "System.Boolean" - }, - { - "Name": "rowVersion", - "Type": "System.Boolean" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.TypeScaffoldingInfo", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "typeMapper", - "Type": "Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Schemas", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IReadOnlyList", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Tables", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IReadOnlyList", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "tables", - "Type": "System.Collections.Generic.IEnumerable" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "tables", - "Type": "System.Collections.Generic.IEnumerable" - }, - { - "Name": "schemas", - "Type": "System.Collections.Generic.IEnumerable" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "All", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet", - "Static": true, - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.TypeScaffoldingInfo", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_ClrType", - "Parameters": [], - "ReturnType": "System.Type", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsInferred", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ScaffoldUnicode", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ScaffoldMaxLength", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "clrType", - "Type": "System.Type" - }, - { - "Name": "inferred", - "Type": "System.Boolean" - }, - { - "Name": "scaffoldUnicode", - "Type": "System.Nullable" - }, - { - "Name": "scaffoldMaxLength", - "Type": "System.Nullable" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Table", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Table", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_PrimaryKeyOrdinal", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_PrimaryKeyOrdinal", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Ordinal", - "Parameters": [], - "ReturnType": "System.Int32", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Ordinal", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsNullable", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsNullable", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DataType", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DataType", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DefaultValue", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DefaultValue", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ComputedValue", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_ComputedValue", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_MaxLength", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_MaxLength", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Precision", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Precision", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Scale", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Scale", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ValueGenerated", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_ValueGenerated", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DisplayName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_DatabaseName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DatabaseName", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DefaultSchemaName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DefaultSchemaName", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Tables", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Sequences", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyColumnModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Ordinal", - "Parameters": [], - "ReturnType": "System.Int32", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Ordinal", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Column", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Column", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_PrincipalColumn", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_PrincipalColumn", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Table", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Table", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_PrincipalTable", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_PrincipalTable", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Columns", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_OnDelete", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_OnDelete", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DisplayName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexColumnModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Ordinal", - "Parameters": [], - "ReturnType": "System.Int32", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Ordinal", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Column", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Column", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Index", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Index", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Table", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Table", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IndexColumns", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IndexColumns", - "Parameters": [ - { - "Name": "value", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsUnique", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsUnique", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_UseProviderMethodName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_UseProviderMethodName", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_EntityTypeErrors", - "Parameters": [], - "ReturnType": "System.Collections.Generic.IDictionary", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_EntityTypeErrors", - "Parameters": [ - { - "Name": "value", - "Type": "System.Collections.Generic.IDictionary" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "model", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IModel" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingPropertyAnnotations", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_ColumnOrdinal", - "Parameters": [], - "ReturnType": "System.Int32", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_ColumnOrdinal", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "property", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IProperty" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.SequenceModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Database", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Database", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_SchemaName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_SchemaName", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DataType", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_DataType", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Start", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Start", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IncrementBy", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IncrementBy", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Min", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Min", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Max", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Max", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsCyclic", - "Parameters": [], - "ReturnType": "System.Nullable", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsCyclic", - "Parameters": [ - { - "Name": "value", - "Type": "System.Nullable" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Database", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Database", - "Parameters": [ - { - "Name": "value", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Name", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Name", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_SchemaName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_SchemaName", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Columns", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_Columns", - "Parameters": [ - { - "Name": "value", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_Indexes", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_ForeignKeys", - "Parameters": [], - "ReturnType": "System.Collections.Generic.ICollection", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_DisplayName", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.ScaffoldingAnnotationNames", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Field", - "Name": "Prefix", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"Scaffolding:\"" - }, - { - "Kind": "Field", - "Name": "UseProviderMethodName", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"UseProviderMethodName\"" - }, - { - "Kind": "Field", - "Name": "ColumnOrdinal", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"ColumnOrdinal\"" - }, - { - "Kind": "Field", - "Name": "DependentEndNavigation", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"DependentEndNavigation\"" - }, - { - "Kind": "Field", - "Name": "PrincipalEndNavigation", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"PrincipalEndNavigation\"" - }, - { - "Kind": "Field", - "Name": "EntityTypeErrors", - "Parameters": [], - "ReturnType": "System.String", - "Static": true, - "Visibility": "Public", - "GenericParameter": [], - "Constant": true, - "Literal": "\"EntityTypeErrors\"" - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.ScaffoldingFullAnnotationNames", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Instance", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.Internal.ScaffoldingFullAnnotationNames", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "prefix", - "Type": "System.String" - } - ], - "Visibility": "Protected", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "UseProviderMethodName", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "ColumnOrdinal", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "DependentEndNavigation", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "PrincipalEndNavigation", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "EntityTypeErrors", - "Parameters": [], - "ReturnType": "System.String", - "ReadOnly": true, - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "GenerateCandidateIdentifier", - "Parameters": [ - { - "Name": "originalIdentifier", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetDependentEndCandidateNavigationPropertyName", - "Parameters": [ - { - "Name": "foreignKey", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IForeignKey" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetPrincipalEndCandidateNavigationPropertyName", - "Parameters": [ - { - "Name": "foreignKey", - "Type": "Microsoft.EntityFrameworkCore.Metadata.IForeignKey" - }, - { - "Name": "dependentEndNavigationPropertyName", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpNamer", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "GetName", - "Parameters": [ - { - "Name": "item", - "Type": "T0" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "nameGetter", - "Type": "System.Func" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Field", - "Name": "NameCache", - "Parameters": [], - "ReturnType": "System.Collections.Generic.Dictionary", - "ReadOnly": true, - "Visibility": "Protected", - "GenericParameter": [] - } - ], - "GenericParameters": [ - { - "ParameterName": "T", - "ParameterPosition": 0, - "BaseTypeOrInterfaces": [] - } - ] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpUniqueNamer", - "Visibility": "Public", - "Kind": "Class", - "BaseType": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpNamer", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "GetName", - "Parameters": [ - { - "Name": "item", - "Type": "T0" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Override": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "nameGetter", - "Type": "System.Func" - } - ], - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "nameGetter", - "Type": "System.Func" - }, - { - "Name": "usedNames", - "Type": "System.Collections.Generic.IEnumerable" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [ - { - "ParameterName": "T", - "ParameterPosition": 0, - "BaseTypeOrInterfaces": [] - } - ] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpUtilities", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Instance", - "Parameters": [], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.CSharpUtilities", - "Static": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "DelimitString", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "EscapeString", - "Parameters": [ - { - "Name": "str", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "EscapeVerbatimString", - "Parameters": [ - { - "Name": "str", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Byte[]" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int32" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Int64" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Decimal" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Single" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Double" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.TimeSpan" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.DateTime" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.DateTimeOffset" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Guid" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateVerbatimStringLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.String" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateLiteral", - "Parameters": [ - { - "Name": "value", - "Type": "System.Object" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "IsCSharpKeyword", - "Parameters": [ - { - "Name": "identifier", - "Type": "System.String" - } - ], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateCSharpIdentifier", - "Parameters": [ - { - "Name": "identifier", - "Type": "System.String" - }, - { - "Name": "existingIdentifiers", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GenerateCSharpIdentifier", - "Parameters": [ - { - "Name": "identifier", - "Type": "System.String" - }, - { - "Name": "existingIdentifiers", - "Type": "System.Collections.Generic.ICollection" - }, - { - "Name": "uniquifier", - "Type": "System.Func, System.String>" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "Uniquifier", - "Parameters": [ - { - "Name": "proposedIdentifier", - "Type": "System.String" - }, - { - "Name": "existingIdentifiers", - "Type": "System.Collections.Generic.ICollection" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "GetTypeName", - "Parameters": [ - { - "Name": "propertyType", - "Type": "System.Type" - } - ], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "IsValidIdentifier", - "Parameters": [ - { - "Name": "name", - "Type": "System.String" - } - ], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.DbDataReaderExtension", - "Visibility": "Public", - "Kind": "Class", - "Abstract": true, - "Static": true, - "Sealed": true, - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "GetValueOrDefault", - "Parameters": [ - { - "Name": "reader", - "Type": "System.Data.Common.DbDataReader" - }, - { - "Name": "name", - "Type": "System.String" - } - ], - "ReturnType": "T0", - "Static": true, - "Extension": true, - "Visibility": "Public", - "GenericParameter": [ - { - "ParameterName": "T", - "ParameterPosition": 0, - "BaseTypeOrInterfaces": [] - } - ] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.Internal.IInternalDatabaseModelFactory", - "Visibility": "Public", - "Kind": "Interface", - "Abstract": true, - "ImplementedInterfaces": [ - "Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory" - ], - "Members": [ - { - "Kind": "Method", - "Name": "Create", - "Parameters": [ - { - "Name": "connection", - "Type": "System.Data.Common.DbConnection" - }, - { - "Name": "tableSelectionSet", - "Type": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet" - } - ], - "ReturnType": "Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel", - "GenericParameter": [] - } - ], - "GenericParameters": [] - }, - { - "Name": "Microsoft.EntityFrameworkCore.Scaffolding.TableSelectionSet+Selection", - "Visibility": "Public", - "Kind": "Class", - "ImplementedInterfaces": [], - "Members": [ - { - "Kind": "Method", - "Name": "get_Text", - "Parameters": [], - "ReturnType": "System.String", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "get_IsMatched", - "Parameters": [], - "ReturnType": "System.Boolean", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Method", - "Name": "set_IsMatched", - "Parameters": [ - { - "Name": "value", - "Type": "System.Boolean" - } - ], - "ReturnType": "System.Void", - "Virtual": true, - "Visibility": "Public", - "GenericParameter": [] - }, - { - "Kind": "Constructor", - "Name": ".ctor", - "Parameters": [ - { - "Name": "selectionText", - "Type": "System.String" - } - ], - "Visibility": "Public", - "GenericParameter": [] - } - ], - "GenericParameters": [] - } - ] -} \ No newline at end of file diff --git a/src/EFCore.Relational.Design/breakingchanges.netcore.json b/src/EFCore.Relational.Design/breakingchanges.netcore.json deleted file mode 100644 index 7005832f914..00000000000 --- a/src/EFCore.Relational.Design/breakingchanges.netcore.json +++ /dev/null @@ -1,73 +0,0 @@ -[ - { - "TypeId": "public enum Microsoft.EntityFrameworkCore.Infrastructure.RelationalDesignEventId", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "MemberId": "protected virtual Microsoft.Extensions.Logging.ILogger get_Logger()", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "MemberId": "public .ctor(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.EntityFrameworkCore.Storage.IRelationalTypeMapper typeMapper, Microsoft.EntityFrameworkCore.Scaffolding.IDatabaseModelFactory databaseModelFactory, Microsoft.EntityFrameworkCore.Scaffolding.Internal.CandidateNamingService candidateNamingService)", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.DatabaseModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ForeignKeyModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexColumnModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.IndexModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingModelAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalModelAnnotations", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ScaffoldingPropertyAnnotations : Microsoft.EntityFrameworkCore.Metadata.RelationalPropertyAnnotations", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.SequenceModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.Metadata.TableModel : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.ScaffoldingTypeMapper", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.TypeScaffoldingInfo", - "Kind": "Removal" - }, - { - "TypeId": "public static class Microsoft.EntityFrameworkCore.Metadata.ScaffoldingMetadataExtensions", - "Kind": "Removal" - }, - { - "TypeId": "public class Microsoft.EntityFrameworkCore.Scaffolding.RelationalScaffoldingModelFactory : Microsoft.EntityFrameworkCore.Scaffolding.IScaffoldingModelFactory", - "MemberId": "protected virtual Microsoft.EntityFrameworkCore.Storage.RelationalTypeMapping GetTypeMapping(Microsoft.EntityFrameworkCore.Scaffolding.Metadata.ColumnModel column)", - "Kind": "Removal" - } -] \ No newline at end of file diff --git a/src/EFCore.Relational.Specification.Tests/EFCore.Relational.Specification.Tests.csproj b/src/EFCore.Relational.Specification.Tests/EFCore.Relational.Specification.Tests.csproj index e43d343baea..d855371a046 100644 --- a/src/EFCore.Relational.Specification.Tests/EFCore.Relational.Specification.Tests.csproj +++ b/src/EFCore.Relational.Specification.Tests/EFCore.Relational.Specification.Tests.csproj @@ -15,7 +15,6 @@ - diff --git a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs index 99b8ab29fca..c3c021179be 100644 --- a/src/EFCore.Relational/Diagnostics/RelationalEventId.cs +++ b/src/EFCore.Relational/Diagnostics/RelationalEventId.cs @@ -62,7 +62,32 @@ private enum Id // Model validation events ModelValidationKeyDefaultValueWarning = CoreEventId.RelationalBaseId + 600, - BoolWithDefaultWarning + BoolWithDefaultWarning, + + // Scaffolding warning events + MissingTableWarning = CoreEventId.CoreDesignBaseId + 700, + SequenceNotNamedWarning, + IndexColumnsNotMappedWarning, + ForeignKeyReferencesMissingTableWarning, + ForeignKeyReferencesMissingPrincipalTableWarning, + ForeignKeyColumnsNotMappedWarning, + ForeignKeyNotNamedWarning, + ForeignKeyColumnMissingWarning, + ForeignKeyColumnNotNamedWarning, + ForeignKeyPrincipalColumnMissingWarning, + ColumnNotNamedWarning, + IndexNotNamedWarning, + IndexTableMissingWarning, + IndexColumnNotNamedWarning, + + // Scaffolding events + TableFound = CoreEventId.CoreDesignBaseId + 800, + TableSkipped, + ColumnSkipped, + IndexFound, + IndexColumnFound, + IndexColumnSkipped, + SequenceFound } private static readonly string _connectionPrefix = DbLoggerCategory.Database.Connection.Name + "."; @@ -434,5 +459,134 @@ private enum Id /// /// public static readonly EventId BoolWithDefaultWarning = MakeValidationId(Id.BoolWithDefaultWarning); + + private static readonly string _scaffoldingPrefix = DbLoggerCategory.Scaffolding.Name + "."; + private static EventId MakeScaffoldingId(Id id) => new EventId((int)id, _scaffoldingPrefix + id); + + /// + /// The database is missing a table. + /// This event is in the category. + /// + public static readonly EventId MissingTableWarning = MakeScaffoldingId(Id.MissingTableWarning); + + /// + /// The database has an unnamed sequence. + /// This event is in the category. + /// + public static readonly EventId SequenceNotNamedWarning = MakeScaffoldingId(Id.SequenceNotNamedWarning); + + /// + /// Columns in an index were not mapped. + /// This event is in the category. + /// + public static readonly EventId IndexColumnsNotMappedWarning = MakeScaffoldingId(Id.IndexColumnsNotMappedWarning); + + /// + /// A foreign key references a missing table. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyReferencesMissingTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingTableWarning); + + /// + /// A foreign key references a missing table at the principal end. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyReferencesMissingPrincipalTableWarning = MakeScaffoldingId(Id.ForeignKeyReferencesMissingPrincipalTableWarning); + + /// + /// Columns in a foreign key were not mapped. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyColumnsNotMappedWarning = MakeScaffoldingId(Id.ForeignKeyColumnsNotMappedWarning); + + /// + /// A foreign key is not named. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyNotNamedWarning = MakeScaffoldingId(Id.ForeignKeyNotNamedWarning); + + /// + /// A foreign key column was not found. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyColumnMissingWarning); + + /// + /// A column referenced by a foreign key constraint was not found. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyPrincipalColumnMissingWarning = MakeScaffoldingId(Id.ForeignKeyPrincipalColumnMissingWarning); + + /// + /// A foreign key column was not named. + /// This event is in the category. + /// + public static readonly EventId ForeignKeyColumnNotNamedWarning = MakeScaffoldingId(Id.ForeignKeyColumnNotNamedWarning); + + /// + /// A column is not named. + /// This event is in the category. + /// + public static readonly EventId ColumnNotNamedWarning = MakeScaffoldingId(Id.ColumnNotNamedWarning); + + /// + /// An index is not named. + /// This event is in the category. + /// + public static readonly EventId IndexNotNamedWarning = MakeScaffoldingId(Id.IndexNotNamedWarning); + + /// + /// The table referened by an index was not found. + /// This event is in the category. + /// + public static readonly EventId IndexTableMissingWarning = MakeScaffoldingId(Id.IndexTableMissingWarning); + + /// + /// An index column was not named. + /// This event is in the category. + /// + public static readonly EventId IndexColumnNotNamedWarning = MakeScaffoldingId(Id.IndexColumnNotNamedWarning); + + /// + /// A table was found. + /// This event is in the category. + /// + public static readonly EventId TableFound = MakeScaffoldingId(Id.TableFound); + + /// + /// A table was skipped. + /// This event is in the category. + /// + public static readonly EventId TableSkipped = MakeScaffoldingId(Id.TableSkipped); + + /// + /// A column was skipped. + /// This event is in the category. + /// + public static readonly EventId ColumnSkipped = MakeScaffoldingId(Id.ColumnSkipped); + + /// + /// An index was found. + /// This event is in the category. + /// + public static readonly EventId IndexFound = MakeScaffoldingId(Id.IndexFound); + + /// + /// An index was skipped. + /// This event is in the category. + /// + public static readonly EventId IndexColumnFound = MakeScaffoldingId(Id.IndexColumnFound); + + /// + /// A column of an index was skipped. + /// This event is in the category. + /// + public static readonly EventId IndexColumnSkipped = MakeScaffoldingId(Id.IndexColumnSkipped); + + /// + /// A sequence was found. + /// This event is in the category. + /// + public static readonly EventId SequenceFound = MakeScaffoldingId(Id.SequenceFound); } } diff --git a/src/EFCore.Relational/Internal/RelationalLoggerExtensions.cs b/src/EFCore.Relational/Internal/RelationalLoggerExtensions.cs index 74fa425c9d9..d2f5e996667 100644 --- a/src/EFCore.Relational/Internal/RelationalLoggerExtensions.cs +++ b/src/EFCore.Relational/Internal/RelationalLoggerExtensions.cs @@ -2,9 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; +using System.Collections.Generic; using System.Data; using System.Data.Common; +using System.Diagnostics; using System.Globalization; +using System.Linq; using System.Linq.Expressions; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore.Diagnostics; @@ -14,6 +17,7 @@ using Microsoft.EntityFrameworkCore.Migrations.Internal; using Microsoft.EntityFrameworkCore.Storage; using Microsoft.EntityFrameworkCore.Storage.Internal; +using Microsoft.Extensions.Logging; using Remotion.Linq; namespace Microsoft.EntityFrameworkCore.Internal @@ -1116,5 +1120,559 @@ private static string BoolWithDefaultWarning(EventDefinitionBase definition, Eve var p = (PropertyEventData)payload; return d.GenerateMessage(p.Property.Name, p.Property.DeclaringEntityType.DisplayName()); } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void MissingTableWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogMissingTable; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void SequenceNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics) + { + var definition = RelationalStrings.LogSequencesRequireName; + + definition.Log(diagnostics); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write(definition.EventId.Name, null); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexColumnsNotMappedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string indexName, + [NotNull] IList unmappedColumnNames) + { + var definition = RelationalStrings.LogUnableToScaffoldIndexMissingProperty; + + definition.Log( + diagnostics, + indexName, + string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + IndexName = indexName, + UnmappedColumnNames = unmappedColumnNames + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyReferencesMissingTableWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName) + { + var definition = RelationalStrings.LogForeignKeyScaffoldErrorPrincipalTableNotFound; + + definition.Log(diagnostics, foreignKeyName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyColumnsNotMappedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [NotNull] IList unmappedColumnNames) + { + var definition = RelationalStrings.LogForeignKeyScaffoldErrorPropertyNotFound; + + definition.Log( + diagnostics, + foreignKeyName, + string.Join(CultureInfo.CurrentCulture.TextInfo.ListSeparator, unmappedColumnNames)); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + UnmappedColumnNames = unmappedColumnNames + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void SequenceFound( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string sequenceName, + [CanBeNull] string sequenceTypeName, + bool? cyclic, + int? increment, + long? start, + long? min, + long? max) + { + var definition = RelationalStrings.LogFoundSequence; + + Debug.Assert(LogLevel.Debug == definition.Level); + + if (diagnostics.GetLogBehavior(definition.EventId, definition.Level) != WarningBehavior.Ignore) + { + definition.Log( + diagnostics, + l => l.LogDebug( + definition.EventId, + null, + definition.MessageFormat, + sequenceName, + sequenceTypeName, + cyclic, + increment, + start, + min, + max)); + } + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + SequenceName = sequenceName, + SequenceTypeName = sequenceTypeName, + Cyclic = cyclic, + Increment = increment, + Start = start, + Min = min, + Max = max + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void TableFound( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogFoundTable; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void TableSkipped( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogTableNotInSelectionSet; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ColumnSkipped( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName, + [CanBeNull] string columnName) + { + var definition = RelationalStrings.LogColumnNotInSelectionSet; + + definition.Log(diagnostics, columnName, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName, + ColumnName = columnName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexColumnFound( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName, + [CanBeNull] string indexName, + bool? unique, + [CanBeNull] string columnName, + int? ordinal) + { + var definition = RelationalStrings.LogFoundIndexColumn; + + definition.Log(diagnostics, indexName, tableName, columnName, ordinal); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName, + IndexName = indexName, + Unique = unique, + ColumnName = columnName, + Ordinal = ordinal + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ColumnNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogColumnNameEmptyOnTable; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexColumnSkipped( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName, + [CanBeNull] string indexName, + [CanBeNull] string columnName) + { + var definition = RelationalStrings.LogIndexColumnNotInSelectionSet; + + definition.Log(diagnostics, columnName, indexName, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName, + IndexName = indexName, + ColumnName = columnName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogIndexNameEmpty; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexTableMissingWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string indexName, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogUnableToFindTableForIndex; + + definition.Log(diagnostics, indexName, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + IndexName = indexName, + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexColumnNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string indexName, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogColumnNameEmptyOnIndex; + + definition.Log(diagnostics, indexName, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + IndexName = indexName, + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogForeignKeyNameEmpty; + + definition.Log(diagnostics, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyColumnMissingWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string columnName, + [CanBeNull] string foreignKeyName, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogForeignKeyColumnNotInSelectionSet; + + definition.Log(diagnostics, columnName, foreignKeyName, tableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ColumnName = columnName, + ForeignKeyName = foreignKeyName, + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyReferencesMissingPrincipalTableWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [CanBeNull] string tableName, + [CanBeNull] string principalTableName) + { + var definition = RelationalStrings.LogPrincipalTableNotInSelectionSet; + + definition.Log(diagnostics, foreignKeyName, tableName, principalTableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + TableName = tableName, + PrincipalTableName = principalTableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyColumnNotNamedWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [CanBeNull] string tableName) + { + var definition = RelationalStrings.LogColumnNameEmptyOnForeignKey; + + definition.Log(diagnostics, tableName, foreignKeyName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + TableName = tableName + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void IndexFound( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string indexName, + [CanBeNull] string tableName, + bool? unique) + { + var definition = RelationalStrings.LogFoundIndex; + + definition.Log(diagnostics, indexName, tableName, unique); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + IndexName = indexName, + TableName = tableName, + Unique = unique + }); + } + } + + /// + /// This API supports the Entity Framework Core infrastructure and is not intended to be used + /// directly from your code. This API may change or be removed in future releases. + /// + public static void ForeignKeyPrincipalColumnMissingWarning( + [NotNull] this IDiagnosticsLogger diagnostics, + [CanBeNull] string foreignKeyName, + [CanBeNull] string tableName, + [CanBeNull] string principalColumnName, + [CanBeNull] string principalTableName) + { + var definition = RelationalStrings.LogPrincipalColumnNotFound; + + definition.Log(diagnostics, foreignKeyName, tableName, principalColumnName, principalTableName); + + if (diagnostics.DiagnosticSource.IsEnabled(definition.EventId.Name)) + { + diagnostics.DiagnosticSource.Write( + definition.EventId.Name, + new + { + ForeignKeyName = foreignKeyName, + TableName = tableName, + PrincipalColumnName = principalColumnName, + PrincipalTableName = principalTableName + }); + } + } } } diff --git a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs index 9bac13e4104..c6bd12186db 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs +++ b/src/EFCore.Relational/Properties/RelationalStrings.Designer.cs @@ -770,6 +770,255 @@ public static string UnsupportedPropertyType([CanBeNull] object entity, [CanBeNu GetString("UnsupportedPropertyType", nameof(entity), nameof(property), nameof(clrType)), entity, property, clrType); + /// + /// Found sequence name: {name}, data type: {dataType}, cyclic: {isCyclic}, increment: {increment}, start: {start}, minimum: {min}, maximum: {max}. + /// + public static readonly FallbackEventDefinition LogFoundSequence + = new FallbackEventDefinition( + RelationalEventId.SequenceFound, + LogLevel.Debug, + _resourceManager.GetString("LogFoundSequence")); + + /// + /// Sequence name cannot be null or empty. Entity Framework cannot model a sequence that does not have a name. + /// + public static readonly EventDefinition LogSequencesRequireName + = new EventDefinition( + RelationalEventId.SequenceNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.SequenceNotNamedWarning, + _resourceManager.GetString("LogSequencesRequireName"))); + + /// + /// Found table with name: {name}. + /// + public static readonly EventDefinition LogFoundTable + = new EventDefinition( + RelationalEventId.TableFound, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + RelationalEventId.TableFound, + _resourceManager.GetString("LogFoundTable"))); + + /// + /// Table {tableName} is not included in the selection set. Skipping. + /// + public static readonly EventDefinition LogTableNotInSelectionSet + = new EventDefinition( + RelationalEventId.TableSkipped, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + RelationalEventId.TableSkipped, + _resourceManager.GetString("LogTableNotInSelectionSet"))); + + /// + /// Column {columnName} belongs to table {tableName} which is not included in the selection set. Skipping. + /// + public static readonly EventDefinition LogColumnNotInSelectionSet + = new EventDefinition( + RelationalEventId.ColumnSkipped, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + RelationalEventId.ColumnSkipped, + _resourceManager.GetString("LogColumnNotInSelectionSet"))); + + /// + /// Found a column on table {tableName} with an empty or null name. Skipping column. + /// + public static readonly EventDefinition LogColumnNameEmptyOnTable + = new EventDefinition( + RelationalEventId.ColumnNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ColumnNotNamedWarning, + _resourceManager.GetString("LogColumnNameEmptyOnTable"))); + + /// + /// Unable to find a table in the database matching the selected table {table}. + /// + public static readonly EventDefinition LogMissingTable + = new EventDefinition( + RelationalEventId.MissingTableWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.MissingTableWarning, + _resourceManager.GetString("LogMissingTable"))); + + /// + /// Found index column on index {indexName} on table {tableName}, column name: {columnName}, ordinal: {ordinal}. + /// + public static readonly EventDefinition LogFoundIndexColumn + = new EventDefinition( + RelationalEventId.IndexColumnFound, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + RelationalEventId.IndexColumnFound, + _resourceManager.GetString("LogFoundIndexColumn"))); + + /// + /// Index column {columnName} belongs to index {indexName} on table {tableName} which is not included in the selection set. Skipping. + /// + public static readonly EventDefinition LogIndexColumnNotInSelectionSet + = new EventDefinition( + RelationalEventId.IndexColumnSkipped, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.IndexColumnSkipped, + _resourceManager.GetString("LogIndexColumnNotInSelectionSet"))); + + /// + /// Found an index on table {tableName} with an empty or null name. Skipping index. + /// + public static readonly EventDefinition LogIndexNameEmpty + = new EventDefinition( + RelationalEventId.IndexNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.IndexNotNamedWarning, + _resourceManager.GetString("LogIndexNameEmpty"))); + + /// + /// For index {indexName}. Unable to find parent table {tableName}. Skipping index. + /// + public static readonly EventDefinition LogUnableToFindTableForIndex + = new EventDefinition( + RelationalEventId.IndexTableMissingWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.IndexTableMissingWarning, + _resourceManager.GetString("LogUnableToFindTableForIndex"))); + + /// + /// Found a column on index {indexName} on table {tableName} with an empty or null name. Not including column in index. + /// + public static readonly EventDefinition LogColumnNameEmptyOnIndex + = new EventDefinition( + RelationalEventId.IndexColumnNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.IndexColumnNotNamedWarning, + _resourceManager.GetString("LogColumnNameEmptyOnIndex"))); + + /// + /// Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}. + /// + public static readonly EventDefinition LogUnableToScaffoldIndexMissingProperty + = new EventDefinition( + RelationalEventId.IndexColumnsNotMappedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.IndexColumnsNotMappedWarning, + _resourceManager.GetString("LogUnableToScaffoldIndexMissingProperty"))); + + /// + /// Found a foreign key on table {tableName} with an empty or null name. Skipping foreign key. + /// + public static readonly EventDefinition LogForeignKeyNameEmpty + = new EventDefinition( + RelationalEventId.ForeignKeyNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyNotNamedWarning, + _resourceManager.GetString("LogForeignKeyNameEmpty"))); + + /// + /// Foreign key column {columnName} belongs to foreign key {fkName} on table {tableName} which is not included in the selection set. Skipping. + /// + public static readonly EventDefinition LogForeignKeyColumnNotInSelectionSet + = new EventDefinition( + RelationalEventId.ForeignKeyColumnMissingWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyColumnMissingWarning, + _resourceManager.GetString("LogForeignKeyColumnNotInSelectionSet"))); + + /// + /// For foreign key {fkName} on table {tableName}, unable to model the end of the foreign key on principal table {principaltableName}. This is usually because the principal table was not included in the selection set. + /// + public static readonly EventDefinition LogPrincipalTableNotInSelectionSet + = new EventDefinition( + RelationalEventId.ForeignKeyReferencesMissingPrincipalTableWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyReferencesMissingPrincipalTableWarning, + _resourceManager.GetString("LogPrincipalTableNotInSelectionSet"))); + + /// + /// Found a column on foreign key {tableName}.{fkName} with an empty or null name. Not including column in foreign key + /// + public static readonly EventDefinition LogColumnNameEmptyOnForeignKey + = new EventDefinition( + RelationalEventId.ForeignKeyColumnNotNamedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyColumnNotNamedWarning, + _resourceManager.GetString("LogColumnNameEmptyOnForeignKey"))); + + /// + /// Could not scaffold the foreign key '{foreignKeyName}'. The following columns in the foreign key could not be scaffolded: {columnNames}. + /// + public static readonly EventDefinition LogForeignKeyScaffoldErrorPropertyNotFound + = new EventDefinition( + RelationalEventId.ForeignKeyColumnsNotMappedWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyColumnsNotMappedWarning, + _resourceManager.GetString("LogForeignKeyScaffoldErrorPropertyNotFound"))); + + /// + /// Found index with name: {indexName}, table: {tableName}, is unique: {isUnique}. + /// + public static readonly EventDefinition LogFoundIndex + = new EventDefinition( + RelationalEventId.IndexFound, + LogLevel.Debug, + LoggerMessage.Define( + LogLevel.Debug, + RelationalEventId.IndexFound, + _resourceManager.GetString("LogFoundIndex"))); + + /// + /// Could not scaffold the foreign key '{foreignKeyName}'. The referenced table could not be found. This most likely occurred because the referenced table was excluded from scaffolding. + /// + public static readonly EventDefinition LogForeignKeyScaffoldErrorPrincipalTableNotFound + = new EventDefinition( + RelationalEventId.ForeignKeyReferencesMissingTableWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyReferencesMissingTableWarning, + _resourceManager.GetString("LogForeignKeyScaffoldErrorPrincipalTableNotFound"))); + + /// + /// For foreign key with identity {id} on table {tableName}, unable to find the column called {principalColumnName} on the foreign key's principal table, {principaltableName}. Skipping foreign key. + /// + public static readonly EventDefinition LogPrincipalColumnNotFound + = new EventDefinition( + RelationalEventId.ForeignKeyPrincipalColumnMissingWarning, + LogLevel.Warning, + LoggerMessage.Define( + LogLevel.Warning, + RelationalEventId.ForeignKeyPrincipalColumnMissingWarning, + _resourceManager.GetString("LogPrincipalColumnNotFound"))); + private static string GetString(string name, params string[] formatterNames) { var value = _resourceManager.GetString(name); diff --git a/src/EFCore.Relational/Properties/RelationalStrings.resx b/src/EFCore.Relational/Properties/RelationalStrings.resx index b287cf4aea0..d066df68470 100644 --- a/src/EFCore.Relational/Properties/RelationalStrings.resx +++ b/src/EFCore.Relational/Properties/RelationalStrings.resx @@ -396,4 +396,89 @@ No mapping to a relational type can be found for property '{entity}.{property}' with the CLR type '{clrType}'. + + Found sequence name: {name}, data type: {dataType}, cyclic: {isCyclic}, increment: {increment}, start: {start}, minimum: {min}, maximum: {max}. + Debug RelationalEventId.SequenceFound string string bool? int? long? long? long? + + + Sequence name cannot be null or empty. Entity Framework cannot model a sequence that does not have a name. + Warning RelationalEventId.SequenceNotNamedWarning + + + Found table with name: {name}. + Debug RelationalEventId.TableFound string + + + Table {tableName} is not included in the selection set. Skipping. + Debug RelationalEventId.TableSkipped string + + + Column {columnName} belongs to table {tableName} which is not included in the selection set. Skipping. + Debug RelationalEventId.ColumnSkipped string string + + + Found a column on table {tableName} with an empty or null name. Skipping column. + Warning RelationalEventId.ColumnNotNamedWarning string + + + Unable to find a table in the database matching the selected table {table}. + Warning RelationalEventId.MissingTableWarning string + + + Found index column on index {indexName} on table {tableName}, column name: {columnName}, ordinal: {ordinal}. + Debug RelationalEventId.IndexColumnFound string string string int? + + + Index column {columnName} belongs to index {indexName} on table {tableName} which is not included in the selection set. Skipping. + Warning RelationalEventId.IndexColumnSkipped string string string + + + Found an index on table {tableName} with an empty or null name. Skipping index. + Warning RelationalEventId.IndexNotNamedWarning string + + + For index {indexName}. Unable to find parent table {tableName}. Skipping index. + Warning RelationalEventId.IndexTableMissingWarning string string + + + Found a column on index {indexName} on table {tableName} with an empty or null name. Not including column in index. + Warning RelationalEventId.IndexColumnNotNamedWarning string string + + + Unable to scaffold the index '{indexName}'. The following columns could not be scaffolded: {columnNames}. + Warning RelationalEventId.IndexColumnsNotMappedWarning string string + + + Found a foreign key on table {tableName} with an empty or null name. Skipping foreign key. + Warning RelationalEventId.ForeignKeyNotNamedWarning string + + + Foreign key column {columnName} belongs to foreign key {fkName} on table {tableName} which is not included in the selection set. Skipping. + Warning RelationalEventId.ForeignKeyColumnMissingWarning string string string + + + For foreign key {fkName} on table {tableName}, unable to model the end of the foreign key on principal table {principaltableName}. This is usually because the principal table was not included in the selection set. + Warning RelationalEventId.ForeignKeyReferencesMissingPrincipalTableWarning string string string + + + Found a column on foreign key {tableName}.{fkName} with an empty or null name. Not including column in foreign key + Warning RelationalEventId.ForeignKeyColumnNotNamedWarning string string + + + Could not scaffold the foreign key '{foreignKeyName}'. The following columns in the foreign key could not be scaffolded: {columnNames}. + Warning RelationalEventId.ForeignKeyColumnsNotMappedWarning string string + + + Found index with name: {indexName}, table: {tableName}, is unique: {isUnique}. + Debug RelationalEventId.IndexFound string string bool? + + + Could not scaffold the foreign key '{foreignKeyName}'. The referenced table could not be found. This most likely occurred because the referenced table was excluded from scaffolding. + Warning RelationalEventId.ForeignKeyReferencesMissingTableWarning string + + + For foreign key with identity {id} on table {tableName}, unable to find the column called {principalColumnName} on the foreign key's principal table, {principaltableName}. Skipping foreign key. + Warning RelationalEventId.ForeignKeyPrincipalColumnMissingWarning string string string string + + \ No newline at end of file diff --git a/src/EFCore.Relational.Design/Internal/DbDataReaderExtension.cs b/src/EFCore.Relational/Scaffolding/DbDataReaderExtension.cs similarity index 100% rename from src/EFCore.Relational.Design/Internal/DbDataReaderExtension.cs rename to src/EFCore.Relational/Scaffolding/DbDataReaderExtension.cs diff --git a/src/EFCore.Relational.Design/IDatabaseModelFactory.cs b/src/EFCore.Relational/Scaffolding/IDatabaseModelFactory.cs similarity index 100% rename from src/EFCore.Relational.Design/IDatabaseModelFactory.cs rename to src/EFCore.Relational/Scaffolding/IDatabaseModelFactory.cs diff --git a/src/EFCore.Relational.Design/TableSelectionSet.cs b/src/EFCore.Relational/Scaffolding/TableSelectionSet.cs similarity index 100% rename from src/EFCore.Relational.Design/TableSelectionSet.cs rename to src/EFCore.Relational/Scaffolding/TableSelectionSet.cs diff --git a/src/EFCore.SqlServer/EFCore.SqlServer.csproj b/src/EFCore.SqlServer/EFCore.SqlServer.csproj index a7e038ef3fb..e63aa530be9 100644 --- a/src/EFCore.SqlServer/EFCore.SqlServer.csproj +++ b/src/EFCore.SqlServer/EFCore.SqlServer.csproj @@ -18,7 +18,6 @@ - diff --git a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs index 4afca4493e2..c0bcffa1572 100644 --- a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerScaffoldingHelper.cs @@ -21,7 +21,7 @@ public SqlServerScaffoldingHelper([NotNull] ScaffoldingTypeMapper scaffoldingTyp public virtual string GetProviderOptionsBuilder(string connectionString) { - return $"{nameof(SqlServerDbContextOptionsExtensions.UseSqlServer)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; + return $"{nameof(SqlServerDbContextOptionsExtensions.UseSqlServer)}({GenerateVerbatimStringLiteral(connectionString)});"; } public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) @@ -52,5 +52,7 @@ public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnMode } private static string SchemaQualifiedKey(string name, string schema = null) => "[" + (schema ?? "") + "].[" + name + "]"; + + private static string GenerateVerbatimStringLiteral(string value) => "@\"" + value.Replace("\"", "\"\"") + "\""; } } diff --git a/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj b/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj index e52f229e139..797d3316381 100644 --- a/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj +++ b/src/EFCore.Sqlite.Core/EFCore.Sqlite.Core.csproj @@ -20,7 +20,6 @@ - diff --git a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs index 26fdec85f83..3b8097cfc66 100644 --- a/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs +++ b/src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteScaffoldingHelper.cs @@ -20,7 +20,7 @@ public SqliteScaffoldingHelper([NotNull] ScaffoldingTypeMapper scaffoldingTypeMa public virtual string GetProviderOptionsBuilder(string connectionString) { - return $"{nameof(SqliteDbContextOptionsBuilderExtensions.UseSqlite)}({CSharpUtilities.Instance.GenerateVerbatimStringLiteral(connectionString)});"; + return $"{nameof(SqliteDbContextOptionsBuilderExtensions.UseSqlite)}({GenerateVerbatimStringLiteral(connectionString)});"; } public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnModel) @@ -43,5 +43,7 @@ public virtual TypeScaffoldingInfo GetTypeScaffoldingInfo(ColumnModel columnMode return typeScaffoldingInfo; } + + private static string GenerateVerbatimStringLiteral(string value) => "@\"" + value.Replace("\"", "\"\"") + "\""; } } diff --git a/src/EFCore/Diagnostics/CoreEventId.cs b/src/EFCore/Diagnostics/CoreEventId.cs index 7033f32fc07..635b34dfdd9 100644 --- a/src/EFCore/Diagnostics/CoreEventId.cs +++ b/src/EFCore/Diagnostics/CoreEventId.cs @@ -33,11 +33,6 @@ public static class CoreEventId /// public const int RelationalBaseId = 200000; - /// - /// The lower-bound for event IDs used by any relational database provider design-time and tooling. - /// - public const int RelationalDesignBaseId = 250000; - /// /// The lower-bound for event IDs used only by database providers. /// diff --git a/test/EFCore.Design.Tests/EFCore.Design.Tests.csproj b/test/EFCore.Design.Tests/EFCore.Design.Tests.csproj index 5818245c085..925e98ad91a 100644 --- a/test/EFCore.Design.Tests/EFCore.Design.Tests.csproj +++ b/test/EFCore.Design.Tests/EFCore.Design.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/test/EFCore.Relational.Design.Tests/CSharpNamerTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpNamerTest.cs similarity index 100% rename from test/EFCore.Relational.Design.Tests/CSharpNamerTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/CSharpNamerTest.cs diff --git a/test/EFCore.Relational.Design.Tests/CSharpUniqueNamerTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CSharpUniqueNamerTest.cs similarity index 100% rename from test/EFCore.Relational.Design.Tests/CSharpUniqueNamerTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/CSharpUniqueNamerTest.cs diff --git a/test/EFCore.Relational.Design.Tests/CandidateNamingServiceTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/CandidateNamingServiceTest.cs similarity index 100% rename from test/EFCore.Relational.Design.Tests/CandidateNamingServiceTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/CandidateNamingServiceTest.cs diff --git a/test/EFCore.Relational.Design.Tests/NullPluralizerTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/NullPluralizerTest.cs similarity index 100% rename from test/EFCore.Relational.Design.Tests/NullPluralizerTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/NullPluralizerTest.cs diff --git a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs similarity index 99% rename from test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs index cd385f2cd62..e87d68aa8c4 100644 --- a/test/EFCore.Relational.Design.Tests/RelationalScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Design.Tests/Scaffolding/Internal/RelationalScaffoldingModelFactoryTest.cs @@ -275,7 +275,7 @@ public void Unmappable_column_type(string StoreType) }); Assert.Single(_factory.Create(info).FindEntityType("E").GetProperties()); - Assert.Single(_logger.Statements, t => t.Contains(RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("E.Coli", StoreType))); + Assert.Single(_logger.Statements, t => t.Contains(DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("E.Coli", StoreType))); } [Theory] @@ -611,7 +611,7 @@ public void It_logs_warning_for_bad_foreign_key() Assert.Single( _logger.Statements, t => t.Contains( "Warning: " + - RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalKeyNotFound.GenerateMessage( + DesignStrings.LogForeignKeyScaffoldErrorPrincipalKeyNotFound.GenerateMessage( childrenTable.ForeignKeys.ElementAt(0).DisplayName, "NotPkId", "Parent"))); } @@ -712,7 +712,7 @@ public void Unique_nullable_index_used_by_foreign_key() Assert.Single( _logger.Statements, t => t.Contains( "Warning: " + - RelationalDesignStrings.LogForeignKeyPrincipalEndContainsNullableColumns.GenerateMessage( + DesignStrings.LogForeignKeyPrincipalEndContainsNullableColumns.GenerateMessage( table.ForeignKeys.ElementAt(0).DisplayName, "FriendsNameUniqueIndex", "BuddyId"))); } diff --git a/test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs b/test/EFCore.Design.Tests/Scaffolding/Internal/ScaffoldingMetadataExtenstionsTest.cs similarity index 100% rename from test/EFCore.Relational.Design.Tests/ScaffoldingMetadataExtenstionsTest.cs rename to test/EFCore.Design.Tests/Scaffolding/Internal/ScaffoldingMetadataExtenstionsTest.cs diff --git a/test/EFCore.Relational.Design.Tests/ApiConsistencyTest.cs b/test/EFCore.Relational.Design.Tests/ApiConsistencyTest.cs deleted file mode 100644 index b4a2ac45f0d..00000000000 --- a/test/EFCore.Relational.Design.Tests/ApiConsistencyTest.cs +++ /dev/null @@ -1,14 +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 System.Reflection; -using Microsoft.EntityFrameworkCore.Scaffolding; - -namespace Microsoft.EntityFrameworkCore -{ - public class ApiConsistencyTest : ApiConsistencyTestBase - { - protected override Assembly TargetAssembly - => typeof(IScaffoldingModelFactory).GetTypeInfo().Assembly; - } -} diff --git a/test/EFCore.Relational.Design.Tests/EFCore.Relational.Design.Tests.csproj b/test/EFCore.Relational.Design.Tests/EFCore.Relational.Design.Tests.csproj deleted file mode 100644 index 1f84d2f452b..00000000000 --- a/test/EFCore.Relational.Design.Tests/EFCore.Relational.Design.Tests.csproj +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - net461;netcoreapp2.0 - netcoreapp2.0 - Microsoft.EntityFrameworkCore.Relational.Design.Tests - Microsoft.EntityFrameworkCore - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - diff --git a/test/EFCore.Relational.Design.Tests/RelationalDesignEventIdTest.cs b/test/EFCore.Relational.Design.Tests/RelationalDesignEventIdTest.cs deleted file mode 100644 index 3f813dd0ed0..00000000000 --- a/test/EFCore.Relational.Design.Tests/RelationalDesignEventIdTest.cs +++ /dev/null @@ -1,31 +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 System; -using System.Collections.Generic; -using Microsoft.EntityFrameworkCore.Diagnostics; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Internal; -using Microsoft.EntityFrameworkCore.TestUtilities; -using Xunit; - -namespace Microsoft.EntityFrameworkCore -{ - public class RelationalDesignEventIdTest - { - [Fact] - public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() - { - var fakeFactories = new Dictionary> - { - { typeof(IList), () => new List { "A", "B" } }, - { typeof(string), () => "Fake" } - }; - - RelationalTestHelpers.Instance.TestEventLogging( - typeof(RelationalDesignEventId), - typeof(RelationalDesignLoggerExtensions), - fakeFactories); - } - } -} diff --git a/test/EFCore.Relational.Tests/RelationalEventIdTest.cs b/test/EFCore.Relational.Tests/RelationalEventIdTest.cs index d7ca6e1f569..2344090644b 100644 --- a/test/EFCore.Relational.Tests/RelationalEventIdTest.cs +++ b/test/EFCore.Relational.Tests/RelationalEventIdTest.cs @@ -41,6 +41,7 @@ public void Every_eventId_has_a_logger_method_and_logs_when_level_enabled() var fakeFactories = new Dictionary> { { typeof(string), () => "Fake" }, + { typeof(IList), () => new List { "Fake1", "Fake2" } }, { typeof(IRelationalConnection), () => new FakeRelationalConnection() }, { typeof(DbCommand), () => new FakeDbCommand() }, { typeof(DbTransaction), () => new FakeDbTransaction() }, diff --git a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs index 138038cf968..36bfcaefd86 100644 --- a/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs +++ b/test/EFCore.SqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs @@ -117,15 +117,15 @@ public void E2ETest_UseAttributesInsteadOfFluentApi() Warn = { indexWarn, - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geographyColumn", "geography"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geometryColumn", "geometry"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), - RelationalDesignStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geographyColumn", "geography"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geometryColumn", "geometry"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), + RelationalStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), //SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), - RelationalDesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), - RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), + DesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), + DesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") } }); AssertEqualFileContents(expectedFileSet, actualFileSet); @@ -168,15 +168,15 @@ public void E2ETest_AllFluentApi() Warn = { indexWarn, - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geographyColumn", "geography"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geometryColumn", "geometry"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), - RelationalDesignStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geographyColumn", "geography"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.geometryColumn", "geometry"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"), + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.AllDataTypes.sql_variantColumn", "sql_variant"), + RelationalStrings.LogUnableToScaffoldIndexMissingProperty.GenerateMessage("IX_UnscaffoldableIndex", "sql_variantColumn,hierarchyidColumn"), //SqlServerDesignStrings.LogDataTypeDoesNotAllowSqlServerIdentityStrategy.GenerateMessage("dbo.PropertyConfiguration.PropertyConfigurationID", "tinyint"), - RelationalDesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), - RelationalDesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), - RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") + DesignStrings.LogCannotFindTypeMappingForColumn.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"), + DesignStrings.LogPrimaryKeyErrorPropertyNotFound.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn", "TableWithUnmappablePrimaryKeyColumnID"), + DesignStrings.LogUnableToGenerateEntityType.GenerateMessage("dbo.TableWithUnmappablePrimaryKeyColumn") } }); AssertEqualFileContents(expectedFileSet, actualFileSet); @@ -249,8 +249,8 @@ CREATE SEQUENCE NumericSequence { Warn = { - RelationalDesignStrings.LogBadSequenceType.GenerateMessage("DecimalSequence", "decimal"), - RelationalDesignStrings.LogBadSequenceType.GenerateMessage("NumericSequence", "numeric") + DesignStrings.LogBadSequenceType.GenerateMessage("DecimalSequence", "decimal"), + DesignStrings.LogBadSequenceType.GenerateMessage("NumericSequence", "numeric") } }); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs index bbefb72fe89..9079fe73985 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/ReverseEngineering/SqliteE2ETestBase.cs @@ -233,12 +233,12 @@ public async Task Missing_primary_key() useDataAnnotations: UseDataAnnotations, overwriteFiles: false); - var errorMessage = RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Alicia"); + var errorMessage = DesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Alicia"); var expectedLog = new LoggerMessages { Warn = { - RelationalDesignStrings.LogMissingPrimaryKey.GenerateMessage("Alicia"), + DesignStrings.LogMissingPrimaryKey.GenerateMessage("Alicia"), errorMessage } }; @@ -273,9 +273,9 @@ FOREIGN KEY (PrincipalId) REFERENCES Principal(Id) { Warn = { - RelationalDesignStrings.LogMissingPrimaryKey.GenerateMessage("Principal"), - RelationalDesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Principal"), - RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError.GenerateMessage("Dependent(PrincipalId)", "Principal") + DesignStrings.LogMissingPrimaryKey.GenerateMessage("Principal"), + DesignStrings.LogUnableToGenerateEntityType.GenerateMessage("Principal"), + DesignStrings.LogForeignKeyScaffoldErrorPrincipalTableScaffoldingError.GenerateMessage("Dependent(PrincipalId)", "Principal") } }; AssertLog(expectedLog); diff --git a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs index fc7b6bccb5c..6699cb397be 100644 --- a/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs +++ b/test/EFCore.Sqlite.Design.FunctionalTests/SqliteScaffoldingModelFactoryTest.cs @@ -208,7 +208,7 @@ FOREIGN KEY (ParentId) REFERENCES Parent (Id) _loggerFactory.Logger.Statements, t => t.Contains( "Warning: " + - RelationalDesignStrings.LogForeignKeyScaffoldErrorPrincipalTableNotFound.GenerateMessage("0"))); + RelationalStrings.LogForeignKeyScaffoldErrorPrincipalTableNotFound.GenerateMessage("0"))); } [Fact] @@ -228,7 +228,7 @@ FOREIGN KEY (ParentId) REFERENCES Parent (Id) _loggerFactory.Logger.Statements, t => t.Contains( "Warning: " + - RelationalDesignStrings.LogPrincipalColumnNotFound.GenerateMessage("0", "Children", "Id", "Parent"))); + RelationalStrings.LogPrincipalColumnNotFound.GenerateMessage("0", "Children", "Id", "Parent"))); } [Fact] diff --git a/test/ef.Tests/AppDomainOperationExecutorTest.cs b/test/ef.Tests/AppDomainOperationExecutorTest.cs index 7a97c4784d9..0268e72066c 100644 --- a/test/ef.Tests/AppDomainOperationExecutorTest.cs +++ b/test/ef.Tests/AppDomainOperationExecutorTest.cs @@ -54,7 +54,6 @@ public void GetMigrations_filters_by_context_name() BuildReference.ByName("Microsoft.EntityFrameworkCore", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational", true), - BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.SqlServer", true), BuildReference.ByName("Microsoft.Extensions.Caching.Abstractions", true), BuildReference.ByName("Microsoft.Extensions.Caching.Memory", true), @@ -160,7 +159,6 @@ public class Context2 : DbContext BuildReference.ByName("Microsoft.EntityFrameworkCore"), BuildReference.ByName("Microsoft.EntityFrameworkCore.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational", true), - BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational.Design", true), BuildReference.ByName("Microsoft.Extensions.DependencyInjection", true), BuildReference.ByName("Microsoft.Extensions.DependencyInjection.Abstractions", true), BuildReference.ByName("Microsoft.Extensions.Logging", true), @@ -232,7 +230,6 @@ public void AddMigration_begins_new_namespace_when_foreign_migrations() BuildReference.ByName("Microsoft.EntityFrameworkCore", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational", true), - BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.SqlServer", true), BuildReference.ByName("Microsoft.Extensions.Caching.Abstractions", true), BuildReference.ByName("Microsoft.Extensions.Caching.Memory", true), @@ -304,7 +301,6 @@ public void Throws_for_no_parameterless_constructor() BuildReference.ByName("Microsoft.EntityFrameworkCore", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational", true), - BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational.Design", true), BuildReference.ByName("Microsoft.Extensions.DependencyInjection", true), BuildReference.ByName("Microsoft.Extensions.DependencyInjection.Abstractions", true), BuildReference.ByName("Microsoft.Extensions.Logging", true), diff --git a/test/ef.Tests/SimpleProjectTest.cs b/test/ef.Tests/SimpleProjectTest.cs index fd97bc3d181..59e025bbaee 100644 --- a/test/ef.Tests/SimpleProjectTest.cs +++ b/test/ef.Tests/SimpleProjectTest.cs @@ -141,7 +141,6 @@ public SimpleProject() BuildReference.ByName("Microsoft.EntityFrameworkCore", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational", true), - BuildReference.ByName("Microsoft.EntityFrameworkCore.Relational.Design", true), BuildReference.ByName("Microsoft.EntityFrameworkCore.SqlServer", true), BuildReference.ByName("Microsoft.Extensions.Caching.Abstractions", true), BuildReference.ByName("Microsoft.Extensions.Caching.Memory", true),