Skip to content

refactor(distributed-locks): move extensions from DbContext to DatabaseFacade#7

Merged
mnbuhl merged 1 commit intomainfrom
refactor/distributed-lock-extensions-on-database-facade
Apr 25, 2026
Merged

refactor(distributed-locks): move extensions from DbContext to DatabaseFacade#7
mnbuhl merged 1 commit intomainfrom
refactor/distributed-lock-extensions-on-database-facade

Conversation

@mnbuhl
Copy link
Copy Markdown
Owner

@mnbuhl mnbuhl commented Apr 25, 2026

Summary

  • Relocates distributed lock extension methods from DbContext to DatabaseFacade so they're accessed via ctx.Database.AcquireDistributedLockAsync(...) instead of ctx.AcquireDistributedLockAsync(...).
  • Renames the file from DbContextDistributedLockExtensions.cs to DatabaseFacadeDistributedLockExtensions.cs.
  • Updates README, sample apps, integration/unit tests, and CLAUDE.md to use the new call site.

Test plan

  • dotnet csharpier check .
  • dotnet build --configuration Release
  • dotnet test tests/EntityFrameworkCore.Locking.Tests
  • dotnet test tests/EntityFrameworkCore.Locking.PostgreSQL.Tests
  • dotnet test tests/EntityFrameworkCore.Locking.MySql.Tests
  • dotnet test tests/EntityFrameworkCore.Locking.SqlServer.Tests

🤖 Generated with Claude Code

…seFacade

Renames DbContextDistributedLockExtensions to DatabaseFacadeDistributedLockExtensions,
targeting DbContext.Database (DatabaseFacade) instead of DbContext directly. Updates
README, samples, tests, and CLAUDE.md to reflect the new `ctx.Database.Acquire...` call site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mnbuhl mnbuhl merged commit 14a8021 into main Apr 25, 2026
12 checks passed
@mnbuhl mnbuhl deleted the refactor/distributed-lock-extensions-on-database-facade branch April 25, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant