Skip to content

Conversation

Copilot AI review requested due to automatic review settings December 24, 2025 07:27
@maliming maliming added this to the 10.0-patch milestone Dec 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds concurrency checking for soft delete operations to ensure that entities are not soft deleted if they have been modified in the database since they were loaded. The implementation preserves the entity's ConcurrencyStamp during the soft delete process in Entity Framework Core and adds equivalent validation to the MemoryDb implementation for test consistency.

Key Changes

  • Modified Entity Framework Core's soft delete logic to preserve and validate ConcurrencyStamp values
  • Added concurrency stamp validation to MemoryDb's Update method
  • Added test coverage to verify concurrency checking behavior during soft delete operations

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
SoftDelete_Tests.cs Added test case to verify that soft delete operations properly check concurrency stamps and throw exceptions when the stamp doesn't match
MemoryDatabaseCollection.cs Added concurrency stamp validation in the Update method to check if the entity has been modified since it was loaded
AbpDbContext.cs Modified ApplyAbpConceptsForDeletedEntity to preserve the entity's ConcurrencyStamp before reloading, enabling Entity Framework Core's optimistic concurrency check during soft deletes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 90.62500% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.03%. Comparing base (6660304) to head (0627ca1).
⚠️ Report is 187 commits behind head on rel-10.0.

Files with missing lines Patch % Lines
.../Repositories/MemoryDb/MemoryDatabaseCollection.cs 70.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           rel-10.0   #24469      +/-   ##
============================================
- Coverage     51.05%   51.03%   -0.03%     
============================================
  Files          3284     3287       +3     
  Lines        106932   107304     +372     
  Branches       8218     8247      +29     
============================================
+ Hits          54595    54762     +167     
- Misses        50656    50855     +199     
- Partials       1681     1687       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maliming maliming requested a review from EngincanV December 24, 2025 08:30
@EngincanV EngincanV merged commit 4b4365f into rel-10.0 Dec 24, 2025
4 of 5 checks passed
@EngincanV EngincanV deleted the SoftDelete-Concurrency branch December 24, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants