Skip to content

Commit ebc8f63

Browse files
tichybBryan Tichy
andauthored
Add EF Core 10 support with SQL Server 2025 type mapping (#870)
* Add EF Core 10 support with SQL Server 2025 type mapping - Added TemplateType.EfCore10 and FileBasedCore10 enum values - Created TemplateEfCore10 class inheriting from TemplateEfCore8 - Updated TemplateFactory to route EfCore10 template types - Added IsEfCore10Plus() helper method in Settings - Implemented AutoMapSqlServer2025Types feature flag - Added automatic vector and json type mapping for SQL Server 2025 - Created Tester.Integration.EFCore10 project targeting .NET 10 - Updated BuildTT to generate EFCore10 template files - Created Templates.EFCore10 folder structure Resolves #869 * Add EF Core 10 template support with SQL Server 2025 types - Update default TemplateType to EfCore10 in Database.tt - Add EfCore10 enum values and IsEfCore10Plus() helper in ttinclude --------- Co-authored-by: Bryan Tichy <[email protected]>
1 parent 4babce3 commit ebc8f63

29 files changed

+5018
-28
lines changed

BuildTT/TemplateFiles.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ public static class TemplateFiles
1212
{
1313
public static void Create(string templatesRoot)
1414
{
15-
CreateFiles(new TemplateEf6(), Path.Combine(templatesRoot, "Templates.EF6"));
16-
CreateFiles(new TemplateEfCore8(), Path.Combine(templatesRoot, "Templates.EFCore8"));
17-
CreateFiles(new TemplateEfCore8(), Path.Combine(templatesRoot, "Templates.EFCore9"));
15+
CreateFiles(new TemplateEf6(), Path.Combine(templatesRoot, "Templates.EF6"));
16+
CreateFiles(new TemplateEfCore8(), Path.Combine(templatesRoot, "Templates.EFCore8"));
17+
CreateFiles(new TemplateEfCore8(), Path.Combine(templatesRoot, "Templates.EFCore9"));
18+
CreateFiles(new TemplateEfCore10(), Path.Combine(templatesRoot, "Templates.EFCore10"));
1819
}
1920

2021
private static void CreateFiles(Template template, string folder)
@@ -109,4 +110,4 @@ private static void CreateFile(string path, List<string> data)
109110
}
110111
}
111112
}
112-
}
113+
}

EF.Reverse.POCO.GeneratorV3.sln

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.0.32014.148
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.3.11206.111 d18.3
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EntityFramework.Reverse.POCO.Generator", "EntityFramework.Reverse.POCO.Generator\EntityFramework.Reverse.POCO.Generator.csproj", "{FA93A0BD-8B45-43BA-9C57-1D8FD63CAEAE}"
77
EndProject
@@ -59,6 +59,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tester.Integration.EFCore8"
5959
EndProject
6060
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester.Integration.EFCore9", "Tester.Integration.EFCore9\Tester.Integration.EFCore9.csproj", "{95983923-D8F1-4581-826E-618C75EE9D3F}"
6161
EndProject
62+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester.Integration.EFCore10", "Tester.Integration.EFCore10\Tester.Integration.EFCore10.csproj", "{B48E2C35-28CB-4479-BFA6-4709348979FB}"
63+
EndProject
6264
Global
6365
GlobalSection(SolutionConfigurationPlatforms) = preSolution
6466
Debug|Any CPU = Debug|Any CPU
@@ -268,6 +270,22 @@ Global
268270
{95983923-D8F1-4581-826E-618C75EE9D3F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
269271
{95983923-D8F1-4581-826E-618C75EE9D3F}.Release|x86.ActiveCfg = Release|Any CPU
270272
{95983923-D8F1-4581-826E-618C75EE9D3F}.Release|x86.Build.0 = Release|Any CPU
273+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
274+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
275+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|ARM64.ActiveCfg = Debug|ARM64
276+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|ARM64.Build.0 = Debug|ARM64
277+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
278+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
279+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|x86.ActiveCfg = Debug|Any CPU
280+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Debug|x86.Build.0 = Debug|Any CPU
281+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
282+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|Any CPU.Build.0 = Release|Any CPU
283+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|ARM64.ActiveCfg = Release|ARM64
284+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|ARM64.Build.0 = Release|ARM64
285+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
286+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
287+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|x86.ActiveCfg = Release|Any CPU
288+
{B48E2C35-28CB-4479-BFA6-4709348979FB}.Release|x86.Build.0 = Release|Any CPU
271289
EndGlobalSection
272290
GlobalSection(SolutionProperties) = preSolution
273291
HideSolutionNode = FALSE

EntityFramework.Reverse.POCO.Generator/Database.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// For help on the various Types below, please read https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/wiki/Common-Settings.*Types-explained
1313
// The following entries are the only required settings.
1414
Settings.DatabaseType = DatabaseType.SqlServer; // SqlServer, SqlCe, SQLite, PostgreSQL. Coming next: MySql, Oracle
15-
Settings.TemplateType = TemplateType.EfCore9; // EfCore9, EfCore8, Ef6, FileBasedCore8-9. FileBased specify folder using Settings.TemplateFolder
15+
Settings.TemplateType = TemplateType.EfCore10; // EfCore9, EfCore8, Ef6, FileBasedCore8-9. FileBased specify folder using Settings.TemplateFolder
1616
Settings.GeneratorType = GeneratorType.EfCore; // EfCore, Ef6, Custom. Custom edit GeneratorCustom class to provide your own implementation
1717

1818
Settings.FileManagerType = FileManagerType.EfCore; // .NET Core project = EfCore; .NET 4.x project = VisualStudio; No output (testing only) = Null

0 commit comments

Comments
 (0)