diff --git a/.github/workflows/all_build_and_unit_test.yml b/.github/workflows/all_build_and_unit_test.yml
index eaec42e..b33fcf5 100644
--- a/.github/workflows/all_build_and_unit_test.yml
+++ b/.github/workflows/all_build_and_unit_test.yml
@@ -28,10 +28,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Setup .NET 5
+ - name: Setup .NET
uses: actions/setup-dotnet@v1
with:
- dotnet-version: 5.0.203
+ dotnet-version: '6.0.x'
- name: Run CI Build via Cake
run: dotnet run --project ./Build/StrongHeart.Build/StrongHeart.Build.csproj --target BuildStrongHeart
\ No newline at end of file
diff --git a/Build/StrongHeart.Build/StrongHeart.Build.csproj b/Build/StrongHeart.Build/StrongHeart.Build.csproj
index 749e2fc..0571c87 100644
--- a/Build/StrongHeart.Build/StrongHeart.Build.csproj
+++ b/Build/StrongHeart.Build/StrongHeart.Build.csproj
@@ -1,13 +1,13 @@
Exe
- net5.0
+ net6.0
$(MSBuildProjectDirectory)
enable
-
+
\ No newline at end of file
diff --git a/DemoApp/StrongHeart.DemoApp.Business.Events/StrongHeart.DemoApp.Business.Events.csproj b/DemoApp/StrongHeart.DemoApp.Business.Events/StrongHeart.DemoApp.Business.Events.csproj
index d30eea6..ba5b7e3 100644
--- a/DemoApp/StrongHeart.DemoApp.Business.Events/StrongHeart.DemoApp.Business.Events.csproj
+++ b/DemoApp/StrongHeart.DemoApp.Business.Events/StrongHeart.DemoApp.Business.Events.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
diff --git a/DemoApp/StrongHeart.DemoApp.Business.SourceCodeGenerator/StrongHeart.DemoApp.Business.SourceCodeGenerator.csproj b/DemoApp/StrongHeart.DemoApp.Business.SourceCodeGenerator/StrongHeart.DemoApp.Business.SourceCodeGenerator.csproj
index 6c7fae0..562f609 100644
--- a/DemoApp/StrongHeart.DemoApp.Business.SourceCodeGenerator/StrongHeart.DemoApp.Business.SourceCodeGenerator.csproj
+++ b/DemoApp/StrongHeart.DemoApp.Business.SourceCodeGenerator/StrongHeart.DemoApp.Business.SourceCodeGenerator.csproj
@@ -12,7 +12,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/DemoApp/StrongHeart.DemoApp.Business.Tests/StrongHeart.DemoApp.Business.Tests.csproj b/DemoApp/StrongHeart.DemoApp.Business.Tests/StrongHeart.DemoApp.Business.Tests.csproj
index e2c4bd7..0c9558e 100644
--- a/DemoApp/StrongHeart.DemoApp.Business.Tests/StrongHeart.DemoApp.Business.Tests.csproj
+++ b/DemoApp/StrongHeart.DemoApp.Business.Tests/StrongHeart.DemoApp.Business.Tests.csproj
@@ -1,19 +1,19 @@
- net5.0
+ net6.0
false
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/DemoApp/StrongHeart.DemoApp.Business/StrongHeart.DemoApp.Business.csproj b/DemoApp/StrongHeart.DemoApp.Business/StrongHeart.DemoApp.Business.csproj
index c4ddae5..42587ce 100644
--- a/DemoApp/StrongHeart.DemoApp.Business/StrongHeart.DemoApp.Business.csproj
+++ b/DemoApp/StrongHeart.DemoApp.Business/StrongHeart.DemoApp.Business.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
enable
CS8785
diff --git a/DemoApp/StrongHeart.DemoApp.WebApi.Tests/StrongHeart.DemoApp.WebApi.Tests.csproj b/DemoApp/StrongHeart.DemoApp.WebApi.Tests/StrongHeart.DemoApp.WebApi.Tests.csproj
index 9b6a3d5..45bb156 100644
--- a/DemoApp/StrongHeart.DemoApp.WebApi.Tests/StrongHeart.DemoApp.WebApi.Tests.csproj
+++ b/DemoApp/StrongHeart.DemoApp.WebApi.Tests/StrongHeart.DemoApp.WebApi.Tests.csproj
@@ -1,21 +1,21 @@
- net5.0
+ net6.0
false
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/DemoApp/StrongHeart.DemoApp.WebApi/StrongHeart.DemoApp.WebApi.csproj b/DemoApp/StrongHeart.DemoApp.WebApi/StrongHeart.DemoApp.WebApi.csproj
index 164b8e7..719c3d1 100644
--- a/DemoApp/StrongHeart.DemoApp.WebApi/StrongHeart.DemoApp.WebApi.csproj
+++ b/DemoApp/StrongHeart.DemoApp.WebApi/StrongHeart.DemoApp.WebApi.csproj
@@ -1,12 +1,12 @@
- net5.0
+ net6.0
enable
-
+
diff --git a/Src/StrongHeart.Core.Test/StrongHeart.Core.Test.csproj b/Src/StrongHeart.Core.Test/StrongHeart.Core.Test.csproj
index f63df7d..ca64ab9 100644
--- a/Src/StrongHeart.Core.Test/StrongHeart.Core.Test.csproj
+++ b/Src/StrongHeart.Core.Test/StrongHeart.Core.Test.csproj
@@ -1,20 +1,20 @@
- net5.0
+ net6.0
false
latest
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartCSharpEntityTypeGenerator.cs b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartCSharpEntityTypeGenerator.cs
index 5bdcb65..91c50f1 100644
--- a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartCSharpEntityTypeGenerator.cs
+++ b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartCSharpEntityTypeGenerator.cs
@@ -1,4 +1,5 @@
#pragma warning disable 1591
+#pragma warning disable EF1001
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.EntityFrameworkCore.Scaffolding.Internal;
@@ -17,4 +18,5 @@ public StrongHeartCSharpEntityTypeGenerator(IAnnotationCodeGenerator annotationC
}
}
-#pragma warning restore 1591
\ No newline at end of file
+#pragma warning restore 1591
+#pragma warning restore EF1001
\ No newline at end of file
diff --git a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartDbContextGenerator.cs b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartDbContextGenerator.cs
index 2dec673..59da5ec 100644
--- a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartDbContextGenerator.cs
+++ b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartDbContextGenerator.cs
@@ -14,10 +14,12 @@ public StrongHeartDbContextGenerator(IProviderConfigurationCodeGenerator provide
{
}
- public override string WriteCode(IModel model, string contextName, string connectionString, string contextNamespace,
- string modelNamespace, bool useDataAnnotations, bool suppressConnectionStringWarning, bool suppressOnConfiguring)
+ public override string WriteCode(IModel model, string contextName, string connectionString, string? contextNamespace,
+ string? modelNamespace, bool useDataAnnotations, bool useNullableReferenceTypes,
+ bool suppressConnectionStringWarning, bool suppressOnConfiguring)
{
- string code = base.WriteCode(model, contextName, connectionString, contextNamespace, modelNamespace, useDataAnnotations, suppressConnectionStringWarning, suppressOnConfiguring);
+ string code = base.WriteCode(model, contextName, connectionString, contextNamespace, modelNamespace, useDataAnnotations, useNullableReferenceTypes, suppressConnectionStringWarning, suppressOnConfiguring);
+
//string usingPrefix = "using Xxx;" + Environment.NewLine;
const string parameterlessConstructor = @"public MyDbContext()
{
diff --git a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartReverseEngineerScaffolder.cs b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartReverseEngineerScaffolder.cs
index 71e95e9..6baa91a 100644
--- a/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartReverseEngineerScaffolder.cs
+++ b/Src/StrongHeart.EfCore/DesignTimeServices/Scaffold/CustomGenerators/StrongHeartReverseEngineerScaffolder.cs
@@ -1,4 +1,5 @@
#pragma warning disable 1591
+#pragma warning disable EF1001
using System;
using System.Collections.Generic;
using System.Linq;
@@ -6,7 +7,6 @@
using Microsoft.EntityFrameworkCore.Design.Internal;
using Microsoft.EntityFrameworkCore.Scaffolding;
using Microsoft.EntityFrameworkCore.Scaffolding.Internal;
-using Microsoft.EntityFrameworkCore.Storage.Internal;
using StrongHeart.EfCore.DesignTimeServices.Scaffold.Roslyn;
using StrongHeart.EfCore.DesignTimeServices.Scaffold.StoredProcScaffolder;
@@ -14,7 +14,7 @@ namespace StrongHeart.EfCore.DesignTimeServices.Scaffold.CustomGenerators
{
public class StrongHeartReverseEngineerScaffolder : ReverseEngineerScaffolder
{
- public StrongHeartReverseEngineerScaffolder(IDatabaseModelFactory databaseModelFactory, IScaffoldingModelFactory scaffoldingModelFactory, IModelCodeGeneratorSelector modelCodeGeneratorSelector, ICSharpUtilities cSharpUtilities, ICSharpHelper cSharpHelper, INamedConnectionStringResolver connectionStringResolver, IOperationReporter reporter, ApplicationSpecificOptions applicationSpecificOptions)
+ public StrongHeartReverseEngineerScaffolder(IDatabaseModelFactory databaseModelFactory, IScaffoldingModelFactory scaffoldingModelFactory, IModelCodeGeneratorSelector modelCodeGeneratorSelector, ICSharpUtilities cSharpUtilities, ICSharpHelper cSharpHelper, IDesignTimeConnectionStringResolver connectionStringResolver, IOperationReporter reporter, string? rootNamespace, string? contextName, ApplicationSpecificOptions applicationSpecificOptions)
: base(databaseModelFactory, scaffoldingModelFactory, modelCodeGeneratorSelector, cSharpUtilities, cSharpHelper, connectionStringResolver, reporter)
{
ApplicationSpecificOptions = applicationSpecificOptions;
@@ -87,4 +87,5 @@ private SavedModelFiles Combine(IReadOnlyCollection list)
}
}
}
-#pragma warning restore 1591
\ No newline at end of file
+#pragma warning restore 1591
+#pragma warning restore EF1001
\ No newline at end of file
diff --git a/Src/StrongHeart.EfCore/DesignTimeServices/readme.txt b/Src/StrongHeart.EfCore/DesignTimeServices/readme.txt
deleted file mode 100644
index 47812f8..0000000
--- a/Src/StrongHeart.EfCore/DesignTimeServices/readme.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-#pragma warning disable 1591
-using Microsoft.EntityFrameworkCore.Design;
-using Microsoft.EntityFrameworkCore.Scaffolding;
-using Microsoft.EntityFrameworkCore.Scaffolding.Internal;
-using Microsoft.Extensions.DependencyInjection;
-
-namespace Xxx
-{
- /*This class MUST remain as it is used by Scaffold-DbContext power shell command*/
- public class EntityFrameworkCoreDesignTimeServices : IDesignTimeServices
- {
- //Used for scaffolding database to code
- public void ConfigureDesignTimeServices(IServiceCollection serviceCollection)
- {
- ApplicationSpecificOptions options = new ApplicationSpecificOptions(new string[0]);
- serviceCollection.AddSingleton(options);
- serviceCollection.AddSingleton();
- serviceCollection.AddSingleton();
- serviceCollection.AddSingleton();
- }
- }
-}
-#pragma warning restore 1591
\ No newline at end of file
diff --git a/Src/StrongHeart.EfCore/Readme.txt b/Src/StrongHeart.EfCore/Readme.txt
deleted file mode 100644
index ecab673..0000000
--- a/Src/StrongHeart.EfCore/Readme.txt
+++ /dev/null
@@ -1 +0,0 @@
-Scaffold-DbContext "Server=.\sqlexpress;Database=xxx;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DataModels\WriteModels -force -DataAnnotations -Context MyContext -Project MyProject.DataAccess -UseDatabaseNames
\ No newline at end of file
diff --git a/Src/StrongHeart.EfCore/StrongHeart.EfCore.csproj b/Src/StrongHeart.EfCore/StrongHeart.EfCore.csproj
index 04b4167..64ff6ad 100644
--- a/Src/StrongHeart.EfCore/StrongHeart.EfCore.csproj
+++ b/Src/StrongHeart.EfCore/StrongHeart.EfCore.csproj
@@ -1,17 +1,17 @@
-
- netstandard2.1
- enable
- latest
-
+
+ net6.0
+ enable
+ latest
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Src/StrongHeart.FeatureTool/StrongHeart.FeatureTool.csproj b/Src/StrongHeart.FeatureTool/StrongHeart.FeatureTool.csproj
index e6ed8a0..769ecc1 100644
--- a/Src/StrongHeart.FeatureTool/StrongHeart.FeatureTool.csproj
+++ b/Src/StrongHeart.FeatureTool/StrongHeart.FeatureTool.csproj
@@ -1,9 +1,9 @@
-
+
Exe
- net5.0
+ net6.0
true
AddFeature
./nupkg
diff --git a/Src/StrongHeart.Features.AspNetCore/StrongHeart.Features.AspNetCore.csproj b/Src/StrongHeart.Features.AspNetCore/StrongHeart.Features.AspNetCore.csproj
index acdbb65..bad2180 100644
--- a/Src/StrongHeart.Features.AspNetCore/StrongHeart.Features.AspNetCore.csproj
+++ b/Src/StrongHeart.Features.AspNetCore/StrongHeart.Features.AspNetCore.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
enable
diff --git a/Src/StrongHeart.Features.Documentation.Test/StrongHeart.Features.Documentation.Test.csproj b/Src/StrongHeart.Features.Documentation.Test/StrongHeart.Features.Documentation.Test.csproj
index 3fffb91..595ac2c 100644
--- a/Src/StrongHeart.Features.Documentation.Test/StrongHeart.Features.Documentation.Test.csproj
+++ b/Src/StrongHeart.Features.Documentation.Test/StrongHeart.Features.Documentation.Test.csproj
@@ -1,7 +1,7 @@
-
+
- net5.0
+ net6.0
false
@@ -10,13 +10,13 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Src/StrongHeart.Features.Documentation/StrongHeart.Features.Documentation.csproj b/Src/StrongHeart.Features.Documentation/StrongHeart.Features.Documentation.csproj
index 71a2789..0961f48 100644
--- a/Src/StrongHeart.Features.Documentation/StrongHeart.Features.Documentation.csproj
+++ b/Src/StrongHeart.Features.Documentation/StrongHeart.Features.Documentation.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/Src/StrongHeart.Features.Test/StrongHeart.Features.Test.csproj b/Src/StrongHeart.Features.Test/StrongHeart.Features.Test.csproj
index 05a2ac2..277b0a8 100644
--- a/Src/StrongHeart.Features.Test/StrongHeart.Features.Test.csproj
+++ b/Src/StrongHeart.Features.Test/StrongHeart.Features.Test.csproj
@@ -1,7 +1,7 @@
- net5.0
+ net6.0
false
enable
latest
@@ -9,9 +9,9 @@
-
-
-
+
+
+
all
diff --git a/Src/StrongHeart.Features/StrongHeart.Features.csproj b/Src/StrongHeart.Features/StrongHeart.Features.csproj
index 6641881..55cc483 100644
--- a/Src/StrongHeart.Features/StrongHeart.Features.csproj
+++ b/Src/StrongHeart.Features/StrongHeart.Features.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/Src/StrongHeart.Migrations/StrongHeart.Migrations.csproj b/Src/StrongHeart.Migrations/StrongHeart.Migrations.csproj
index 76ce677..7927470 100644
--- a/Src/StrongHeart.Migrations/StrongHeart.Migrations.csproj
+++ b/Src/StrongHeart.Migrations/StrongHeart.Migrations.csproj
@@ -7,8 +7,8 @@
-
-
+
+
diff --git a/Src/StrongHeart.TestTools.ComponentAnalysis.Test/StrongHeart.TestTools.ComponentAnalysis.Test.csproj b/Src/StrongHeart.TestTools.ComponentAnalysis.Test/StrongHeart.TestTools.ComponentAnalysis.Test.csproj
index 53ed37e..f5cc0e1 100644
--- a/Src/StrongHeart.TestTools.ComponentAnalysis.Test/StrongHeart.TestTools.ComponentAnalysis.Test.csproj
+++ b/Src/StrongHeart.TestTools.ComponentAnalysis.Test/StrongHeart.TestTools.ComponentAnalysis.Test.csproj
@@ -1,21 +1,21 @@
- net5.0
+ net6.0
false
latest
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Src/StrongHeart.TestTools.ComponentAnalysis/StrongHeart.TestTools.ComponentAnalysis.csproj b/Src/StrongHeart.TestTools.ComponentAnalysis/StrongHeart.TestTools.ComponentAnalysis.csproj
index 37b749a..174587e 100644
--- a/Src/StrongHeart.TestTools.ComponentAnalysis/StrongHeart.TestTools.ComponentAnalysis.csproj
+++ b/Src/StrongHeart.TestTools.ComponentAnalysis/StrongHeart.TestTools.ComponentAnalysis.csproj
@@ -1,7 +1,7 @@
-
+
- net5.0
+ net6.0
enable
diff --git a/Src/StrongHeart.TestTools.Xunit/StrongHeart.TestTools.Xunit.csproj b/Src/StrongHeart.TestTools.Xunit/StrongHeart.TestTools.Xunit.csproj
index 053b7bd..bbd6802 100644
--- a/Src/StrongHeart.TestTools.Xunit/StrongHeart.TestTools.Xunit.csproj
+++ b/Src/StrongHeart.TestTools.Xunit/StrongHeart.TestTools.Xunit.csproj
@@ -1,11 +1,11 @@
-
+
- net5.0
+ net6.0
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive