Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "NetCoreApplicationTemplate",
"version": "2.1.0",
"version": "2.2.0",
"upload_type": "software",
"description": "A reusable ASP.NET Core application template for secure, maintainable, production-oriented .NET applications. It organizes startup composition, middleware ordering, structured logging, forwarded headers, security headers, rate limiting, centralized error handling, authentication and authorization foundations, EF Core data access patterns, CI validation, template packaging, and DocFX documentation.",
"creators": [
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@ All notable changes to this project are documented in this file.

This project follows Semantic Versioning using the format `MAJOR.MINOR.PATCH`.

## 2.2.0 - 2026-06-29

### Added

* Added `IApplicationSaveChangesPipeline` and `ApplicationSaveChangesPipeline` to move EF Core save preparation out of `ApplicationDbContext` and into an application-owned persistence pipeline.
* Added `ApplicationSaveChangesInterceptor` as the composite EF Core save lifecycle interceptor for invoking the save pipeline through `SavingChanges` / `SavingChangesAsync` and `SavedChanges` / `SavedChangesAsync` hooks.
* Added EF Core save pipeline documentation covering default pipeline order, extension seams, audit lifecycle safety, and the decision to keep a composite interceptor by default.
* Added ADR 0004 documenting the decision to keep the composite SaveChanges interceptor until a concrete consumer or maintenance need justifies specialized interceptors.
* Added tests that verify sync and async save-pipeline invocation through `ApplicationDbContext`.
* Added branch-focused tests for `ApplicationSaveChangesInterceptor`, including constructor null-guard, non-`ApplicationDbContext`, and bounded after-save follow-up branches.

### Changed

* Reduced repeated EF Core `ChangeTracker` inspection by materializing Added/Modified/Deleted entries once and reusing that list across string canonicalization, lookup normalization, timestamp normalization, concurrency stamping, and audit entry creation.
* Reduced `ApplicationDbContext` save overrides to optimistic-concurrency exception handling around EF Core's native save flow.
* Kept `ConcurrencyStamp` as the default application-managed optimistic concurrency token and documented why that remains the portable SQLite / SQL Server baseline.
* Updated package icon and favicon image assets used for repository, NuGet package, and documentation branding.
* Updated release metadata, package README examples, template packaging docs, citation metadata, and Zenodo metadata for `2.2.0`.

### Notes

* This is a minor release because it introduces and documents a clearer EF Core save-pipeline extension seam while preserving the stable `2.x` package identity, template short name, template options, and default scaffold behavior.
* The default generated scaffold continues to use the same package identity, template identity, authentication options, data-access options, and local SQLite development path.
* SQL Server-only consumers may still replace the application-managed concurrency token with provider-native rowversion behavior when appropriate, but the template default remains provider-portable.

## 2.1.0 - 2026-06-27

### Added
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cff-version: 1.2.0
message: "If you use this software, please cite it using the metadata below."
title: "NetCoreApplicationTemplate"
version: "2.1.0"
date-released: "2026-06-27"
version: "2.2.0"
date-released: "2026-06-29"
repository-code: "https://github.com/cdcavell/NetCoreApplicationTemplate"
url: "https://cdcavell.github.io/NetCoreApplicationTemplate/"
type: software
Expand Down
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>

<VersionPrefix>2.1.0</VersionPrefix>
<VersionPrefix>2.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version Condition="'$(VersionSuffix)' == ''">$(VersionPrefix)</Version>
<Version Condition="'$(VersionSuffix)' != ''">$(VersionPrefix)-$(VersionSuffix)</Version>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<FileVersion>2.1.0.0</FileVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<InformationalVersion>$(Version)+$(RepositoryUrl)</InformationalVersion>

<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
Expand Down
4 changes: 2 additions & 2 deletions NetCoreApplicationTemplate.Template.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>PACKAGE-README.md</PackageReadmeFile>
<PackageIcon>PACKAGE-ICON.png</PackageIcon>
<PackageReleaseNotes>Minor 2.1.0 release of the NetCoreApplicationTemplate dotnet new template. This release adds an optional template-owned audit storage seam, documents audit storage extension paths, improves no-op SaveChanges handling, expands production authentication and middleware guidance, adds optional application/domain layering guidance, and refreshes documentation/image assets while preserving the stable 2.x package identity and default scaffold behavior.</PackageReleaseNotes>
<VersionPrefix>2.1.0</VersionPrefix>
<PackageReleaseNotes>Minor 2.2.0 release of the NetCoreApplicationTemplate dotnet new template. This release refactors EF Core SaveChanges preparation into an application-owned save pipeline invoked through a composite SaveChangesInterceptor, reduces repeated ChangeTracker enumeration, documents the EF Core save pipeline extension model, clarifies application-managed concurrency stamp portability, and refreshes package/documentation image assets while preserving the stable 2.x package identity and default scaffold behavior.</PackageReleaseNotes>
<VersionPrefix>2.2.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Version>$(VersionPrefix)</Version>
<PackageType>Template</PackageType>
Expand Down
6 changes: 3 additions & 3 deletions PACKAGE-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ This README is intended for NuGet package consumers. The full repository README
Install the template package from NuGet:

```text
dotnet new install NetCoreApplicationTemplate::2.1.0
dotnet new install NetCoreApplicationTemplate::2.2.0
```

For local package validation, install a packed package directly:

```text
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.1.0.nupkg
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.2.0.nupkg
```

## Generate a project
Expand Down Expand Up @@ -79,7 +79,7 @@ dotnet test --configuration Release
Install the newer package version with the same package identity:

```text
dotnet new install NetCoreApplicationTemplate::2.1.0
dotnet new install NetCoreApplicationTemplate::2.2.0
```

## Uninstall
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ This repository provides a working application baseline with common infrastructu
## Current Release

<!-- BEGIN LATEST_RELEASE -->
Current release: __[Release 2.1.0](https://github.com/cdcavell/NetCoreApplicationTemplate/releases/tag/v2.1.0)__
Current release: __[Release 2.2.0](https://github.com/cdcavell/NetCoreApplicationTemplate/releases/tag/v2.2.0)__

Tag: `v2.1.0`
Tag: `v2.2.0`
<!-- END LATEST_RELEASE -->

## Project Goals
Expand Down Expand Up @@ -163,7 +163,7 @@ The scaffolded consumer output intentionally excludes repository-maintainer cont
Install the published template package:

```powershell
dotnet new install NetCoreApplicationTemplate::2.1.0
dotnet new install NetCoreApplicationTemplate::2.2.0
```

### Pack and Install Locally
Expand All @@ -177,7 +177,7 @@ dotnet pack ./NetCoreApplicationTemplate.Template.csproj --configuration Release
Install the generated package:

```powershell
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.1.0.nupkg
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.2.0.nupkg
```

Generate a consumer project:
Expand Down Expand Up @@ -234,7 +234,7 @@ The non-default scaffold preserves the template's core guardrails, including str
Update the installed template by installing a newer package version:

```powershell
dotnet new install NetCoreApplicationTemplate::2.1.0
dotnet new install NetCoreApplicationTemplate::2.2.0
```

Uninstall the template package:
Expand Down Expand Up @@ -426,12 +426,12 @@ If you use this repository, please cite it using the metadata in [`CITATION.cff`
- Suggested plain-text citation:

```text
Cavell, Christopher D. NetCoreApplicationTemplate. Version 2.1.0. Zenodo. MIT License. https://doi.org/10.5281/zenodo.20373042
Cavell, Christopher D. NetCoreApplicationTemplate. Version 2.2.0. Zenodo. MIT License. https://doi.org/10.5281/zenodo.20373042
```

## Roadmap

The project is a reusable .NET application template with a stable `2.1.0` package baseline. Future work may include additional provider modules, expanded examples, optional template parameters, and continued hardening of the documented release surface.
The project is a reusable .NET application template with a stable `2.2.0` package baseline. Future work may include additional provider modules, expanded examples, optional template parameters, and continued hardening of the documented release surface.

See [Template Packaging](https://cdcavell.github.io/NetCoreApplicationTemplate/articles/template-packaging.html) for the current packaging direction.

Expand Down
6 changes: 3 additions & 3 deletions docs/articles/template-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Package-based validation is preferred because it verifies the actual distributio
| Template identity | `CDCavell.NetCoreApplicationTemplate.CSharp` |
| Template group identity | `CDCavell.NetCoreApplicationTemplate` |
| Source replacement token | `ProjectTemplate` |
| Current package version | `2.1.0` |
| Current package version | `2.2.0` |

The `2.0.0` release moved the public NuGet package ID to `NetCoreApplicationTemplate`. The internal template identity and group identity remain unchanged for template metadata continuity.

Expand Down Expand Up @@ -92,13 +92,13 @@ dotnet pack ./NetCoreApplicationTemplate.Template.csproj --configuration Release
Install the published package from NuGet:

```powershell
dotnet new install NetCoreApplicationTemplate::2.1.0
dotnet new install NetCoreApplicationTemplate::2.2.0
```

Install a locally packed package:

```powershell
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.1.0.nupkg
dotnet new install ./artifacts/template-package/NetCoreApplicationTemplate.2.2.0.nupkg
```

## Create a New Project from the Template
Expand Down
Loading