From d35f2b9b675d5a6ed128d8d90859989757a16689 Mon Sep 17 00:00:00 2001 From: Stephen Walsh Date: Fri, 4 Dec 2026 15:19:25 -0600 Subject: [PATCH 1/2] Keep Serilog and the template tooling on the .NET major (#80) ## Summary Serilog.AspNetCore, Serilog.Extensions.Hosting and Serilog.Settings.Configuration share Microsoft.Extensions' major version, and version 11 of each pulls in Microsoft.Extensions 11. The template engine tooling follows the SDK the same way. Dependabot now leaves their majors alone too, so the monthly update can't bring .NET 11 back in through them. ## Related issues Part of LeanMeanCleanApps/.github#125 ## Type of change - [ ] Bug fix - [ ] New feature - [ ] Breaking change (the generated solution or template parameters change in a way existing users will notice) - [ ] Refactoring or clean-up - [ ] Documentation - [x] Build, pipeline or dependency update ## Shared layers - [ ] This only touches the Presentation layer of this template. - [x] This touches the Application or Infrastructure layers, tests, pipeline or repository setup, so it needs to be carried across all five templates. ## Checklist - [x] `dotnet build` and `dotnet test` pass locally with no warnings. - [ ] I added or updated tests, and line coverage stays at or above 95%. - [ ] I updated the README or docs where behaviour changed. - [ ] If this changes how we do something, I updated the matching skill in `.agents/skills`. - [ ] I checked the template still installs and creates a working solution (see CONTRIBUTING.md). From 0c39821f3c58ef5a3371e829f99ecb5acb951dc3 Mon Sep 17 00:00:00 2001 From: Stephen Walsh <868017+stphnwlsh@users.noreply.github.com> Date: Fri, 4 Dec 2026 14:21:09 -0600 Subject: [PATCH 2/2] Bring the skill examples back in line with the code --- .agents/skills/add-a-use-case/SKILL.md | 4 +--- .agents/skills/data-access-ef-core/SKILL.md | 3 ++- .agents/skills/test-design/SKILL.md | 2 +- .agents/skills/time-provider/SKILL.md | 6 ++++-- .agents/skills/unit-tests/SKILL.md | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.agents/skills/add-a-use-case/SKILL.md b/.agents/skills/add-a-use-case/SKILL.md index 98ab76b..6c38564 100644 --- a/.agents/skills/add-a-use-case/SKILL.md +++ b/.agents/skills/add-a-use-case/SKILL.md @@ -55,9 +55,7 @@ public class GetMoviesHandler(IMoviesRepository repository) : IRequestHandler> Handle(GetMoviesQuery request, CancellationToken cancellationToken) { - var (items, totalCount) = await repository.GetMovies(request.Query, request.Offset, request.Limit, cancellationToken); - - return new Page(items, request.Offset, request.Limit, totalCount); + return await repository.GetMovies(request.Query, new PageRequest(request.Offset, request.Limit), cancellationToken); } } ``` diff --git a/.agents/skills/data-access-ef-core/SKILL.md b/.agents/skills/data-access-ef-core/SKILL.md index 5adc9a5..2929225 100644 --- a/.agents/skills/data-access-ef-core/SKILL.md +++ b/.agents/skills/data-access-ef-core/SKILL.md @@ -31,7 +31,7 @@ One repository, `EntityFrameworkMovieReviewsRepository` in `src/Infrastructure/D ```csharp // src/Infrastructure/Databases/MovieReviews/EntityFrameworkMovieReviewsRepository.cs -public async Task UpdateReview(Guid id, int stars, CancellationToken cancellationToken) +public async Task UpdateReview(Guid id, int stars, string? text, CancellationToken cancellationToken) { var now = this.timeProvider.GetUtcNow().UtcDateTime; @@ -41,6 +41,7 @@ public async Task UpdateReview(Guid id, int stars, Cancellat .ExecuteUpdateAsync( setters => setters .SetProperty(r => r.Stars, stars) + .SetProperty(r => r.Text, r => text ?? r.Text) .SetProperty(r => r.DateModified, now), cancellationToken); diff --git a/.agents/skills/test-design/SKILL.md b/.agents/skills/test-design/SKILL.md index f482e72..7a288b4 100644 --- a/.agents/skills/test-design/SKILL.md +++ b/.agents/skills/test-design/SKILL.md @@ -54,7 +54,7 @@ public async Task Handle_ShouldThrowException_ReviewDoesNotExist() // Arrange var command = new UpdateReviewCommand { Id = Guid.NewGuid(), Stars = 5 }; var reviewsRepository = Substitute.For(); - _ = reviewsRepository.UpdateReview(default, default, default).ReturnsForAnyArgs((Review?)null); + _ = reviewsRepository.UpdateReview(default, default, default, default).ReturnsForAnyArgs(Task.FromResult(null)); var handler = new UpdateReviewHandler(reviewsRepository); using var tokenSource = new CancellationTokenSource(); var token = tokenSource.Token; diff --git a/.agents/skills/time-provider/SKILL.md b/.agents/skills/time-provider/SKILL.md index 77d8096..e5f270c 100644 --- a/.agents/skills/time-provider/SKILL.md +++ b/.agents/skills/time-provider/SKILL.md @@ -24,19 +24,21 @@ Times are stored and compared in UTC. Two things read the clock today. The repos ```csharp // src/Infrastructure/Databases/MovieReviews/EntityFrameworkMovieReviewsRepository.cs -public async Task UpdateReview(Guid id, int stars, CancellationToken cancellationToken) +public async Task UpdateReview(Guid id, int stars, string? text, CancellationToken cancellationToken) { var now = this.timeProvider.GetUtcNow().UtcDateTime; + // The update is the existence check: no rows changed means there's no such review. var updated = await this.context.Reviews .Where(r => r.Id == id) .ExecuteUpdateAsync( setters => setters .SetProperty(r => r.Stars, stars) + .SetProperty(r => r.Text, r => text ?? r.Text) .SetProperty(r => r.DateModified, now), cancellationToken); - return updated > 0; + return updated == 0 ? null : await this.GetReviewById(id, cancellationToken); } ``` diff --git a/.agents/skills/unit-tests/SKILL.md b/.agents/skills/unit-tests/SKILL.md index 115b78e..21b5b9d 100644 --- a/.agents/skills/unit-tests/SKILL.md +++ b/.agents/skills/unit-tests/SKILL.md @@ -46,7 +46,7 @@ public async Task Handle_ShouldReturnUpdatedReview_ReviewExists() var review = new Review(command.Id, command.Stars); var reviewsRepository = Substitute.For(); - _ = reviewsRepository.UpdateReview(default, default, default).ReturnsForAnyArgs(review); + _ = reviewsRepository.UpdateReview(default, default, default, default).ReturnsForAnyArgs(review); var handler = new UpdateReviewHandler(reviewsRepository); using var tokenSource = new CancellationTokenSource(); @@ -58,7 +58,7 @@ public async Task Handle_ShouldReturnUpdatedReview_ReviewExists() // Assert result.ShouldBe(review); - _ = await reviewsRepository.Received(1).UpdateReview(command.Id, command.Stars, token); + _ = await reviewsRepository.Received(1).UpdateReview(command.Id, command.Stars, command.Text, token); } ```