Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Before creating a pull request, please refer to the [Contributing Guidelines](ht

## Prerequisites

- [Visual Studio 2022](https://www.visualstudio.com/downloads/) or greater, [JetBrains Rider](https://www.jetbrains.com/rider) 2024.3 or greater.
- [.NET 9.0 SDK](https://dotnet.microsoft.com/download/dotnet) or greater.
- [EF Core CLI 9.0](https://docs.microsoft.com/en-us/ef/core/cli/dotnet) or greater.
- [Visual Studio 2026](https://www.visualstudio.com/downloads/) or greater, [JetBrains Rider](https://www.jetbrains.com/rider) 2025.3 or greater.
- [.NET 10.0 SDK](https://dotnet.microsoft.com/download/dotnet) or greater.
- [EF Core CLI 10.0](https://docs.microsoft.com/en-us/ef/core/cli/dotnet) or greater.
- Install global `dotnet-ef` tool.
```
dotnet tool install --global dotnet-ef
Expand Down Expand Up @@ -54,10 +54,10 @@ docker run -e "ACCEPT_EULA=1" -e "MSSQL_SA_PASSWORD=MyPass@word" -e "MSSQL_PID=D

## Upgrading

1. Upgrade `TargetFramework` in **.csproj** file to `net8.0` or `net9.0`.
1. Upgrade `TargetFramework` in **.csproj** file to `net10.0`.
- Optional: Set `ImplicitUsings` to `enable`.
- Optional: Set `Nullable` to `enable`.
2. Update the following NuGet packages to `9.0.0` or later:
2. Update the following NuGet packages to `10.0.0` or later:
- Microsoft.EntityFrameworkCore.Design
- Microsoft.EntityFrameworkCore.SqlServer
- EntityFrameworkCore.Scaffolding.Handlebars
Expand All @@ -69,7 +69,7 @@ docker run -e "ACCEPT_EULA=1" -e "MSSQL_SA_PASSWORD=MyPass@word" -e "MSSQL_PID=D

## Usage

1. Create a new **.NET 8** or **.NET 9** class library.
1. Create a new **.NET 10** class library.

2. Add EF Core SQL Server and Tools NuGet packages.
- `Microsoft.EntityFrameworkCore.SqlServer`
Expand Down Expand Up @@ -126,7 +126,7 @@ Take advantage of C# nullable reference types by enabling them in your .csproj f

```xml
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
```
Expand Down
6 changes: 3 additions & 3 deletions sample/ScaffoldingSample.Api/ScaffoldingSample.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<InvariantGlobalization>false</InvariantGlobalization>
<UserSecretsId>12811259-bfae-451f-9a72-050791c4ed4b</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions sample/ScaffoldingSample/ScaffoldingSample.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>9.0.0</Version>
<Version>10.0.0</Version>
<Authors>Tony Sneed</Authors>
<Company>Tony Sneed</Company>
<Title>Entity Framework Core Scaffolding with Handlebars</Title>
Expand All @@ -12,22 +12,22 @@
<PackageProjectUrl>https://github.com/TrackableEntities/EntityFrameworkCore.Scaffolding.Handlebars</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<PackageTags>scaffolding reverse-engineer entity-framework-core handlebars</PackageTags>
<PackageReleaseNotes>See: https://github.com/TrackableEntities/EntityFrameworkCore.Scaffolding.Handlebars/releases/tag/v9.0.0</PackageReleaseNotes>
<PackageReleaseNotes>See: https://github.com/TrackableEntities/EntityFrameworkCore.Scaffolding.Handlebars/releases/tag/v10.0.0</PackageReleaseNotes>
<LangVersion>latest</LangVersion>
<IncludeSource>true</IncludeSource>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<AssemblyVersion>9.0.0.0</AssemblyVersion>
<FileVersion>9.0.0.0</FileVersion>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
<FileVersion>10.0.0.0</FileVersion>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Handlebars.Net" Version="2.1.2" />
<PackageReference Include="JetBrains.Annotations" Version="2024.3.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.0" />
<PackageReference Include="Handlebars.Net" Version="2.1.6" />
<PackageReference Include="JetBrains.Annotations" Version="2025.2.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -37,11 +37,12 @@

<ItemGroup>
<Content Include="EntityFrameworkCore.Scaffolding.Handlebars.targets" PackagePath="build/EntityFrameworkCore.Scaffolding.Handlebars.targets" />
<Content Include="CodeTemplates/**/*.*" Pack="true" PackagePath="lib/net8.0/CodeTemplates">
<Content Include="CodeTemplates/**/*.*" Pack="true" PackagePath="lib/net10.0/CodeTemplates">
<PackageCopyToOutput>true</PackageCopyToOutput>
</Content>
</ItemGroup>


<ItemGroup>
<None Update="CodeTemplates\CSharpDbContext\DbContext.hbs">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static IReadOnlyList<T> NotEmpty<T>(IReadOnlyList<T> value, [InvokerParam
{
NotEmpty(parameterName, nameof(parameterName));

throw new ArgumentException(AbstractionsStrings.CollectionArgumentIsEmpty(parameterName));
throw new ArgumentException($"The collection argument '{parameterName}' must contain at least one element.");
}

return value;
Expand All @@ -50,7 +50,7 @@ public static string NotEmpty(string value, [InvokerParameterName] [NotNull] str
}
else if (value.Trim().Length == 0)
{
e = new ArgumentException(AbstractionsStrings.ArgumentIsEmpty(parameterName));
e = new ArgumentException($"The string argument '{parameterName}' cannot be empty.");
}

if (e != null)
Expand All @@ -70,7 +70,7 @@ public static string NullButNotEmpty(string value, [InvokerParameterName] [NotNu
{
NotEmpty(parameterName, nameof(parameterName));

throw new ArgumentException(AbstractionsStrings.ArgumentIsEmpty(parameterName));
throw new ArgumentException($"The string argument '{parameterName}' cannot be empty.");
}

return value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
<UserSecretsId>7cd5132a-1f06-4001-b62c-51cdcbe38dbf</UserSecretsId>
Expand All @@ -12,14 +12,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down