Skip to content

up#284

Merged
baoduy merged 1 commit intomainfrom
dev
Mar 27, 2026
Merged

up#284
baoduy merged 1 commit intomainfrom
dev

Conversation

@baoduy
Copy link
Copy Markdown
Owner

@baoduy baoduy commented Mar 27, 2026

This pull request refactors the data seeding configuration system in the DKNet.EfCore.Extensions library to modernize and simplify how seed data is provided and applied. The main changes involve removing the synchronous, model-managed seeding interface (HasData), shifting to an asynchronous data seeding approach, and updating related APIs and implementations accordingly.

Core changes to data seeding:

  • Removed the HasData property and related logic from the IDataSeedingConfiguration interface and its implementations, eliminating support for synchronous, model-managed seed data registration. [1] [2]
  • Changed the abstract method in DataSeedingConfiguration<TEntity> from GetData() (synchronous) to GetDataAsync() (asynchronous), and updated the SeedAsync implementation to use this method for seeding data asynchronously and avoiding duplicates. [1] [2]
  • Updated the XML documentation throughout to reflect the new asynchronous-only seeding model. [1] [2]

Related updates and cleanup:

  • Removed the RegisterDataSeeding extension and its usage from the model customization pipeline, as model-managed seeding via HasData is no longer supported. [1] [2]
  • Updated test implementations to override the new GetDataAsync method instead of the removed GetData.
  • Minor code style cleanups in the assembly discovery logic for consistency.

@baoduy baoduy merged commit cec9c08 into main Mar 27, 2026
8 of 9 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.37%. Comparing base (19af75c) to head (4d7732c).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...nsions/Configurations/IDataSeedingConfiguration.cs 94.11% 1 Missing ⚠️
...e.Extensions/Internal/AutoConfigModelCustomizer.cs 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #284      +/-   ##
==========================================
- Coverage   84.40%   84.37%   -0.04%     
==========================================
  Files         159      159              
  Lines        3656     3655       -1     
  Branches      567      564       -3     
==========================================
- Hits         3086     3084       -2     
- Misses        412      413       +1     
  Partials      158      158              
Flag Coverage Δ
unittests 84.37% <90.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

📊 Code Coverage Report

| Metric | Coverage |
|--------|----------|
| **Line Coverage** | 87.6% |
| **Branch Coverage** | 81.9% |
| **Method Coverage** | 85.8% |

**Lines:** 3202/undefined covered
**Branches:** 1208/undefined covered

📈 [View Full Coverage Report](https://github.com/baoduy/DKNet/actions/runs/23636923081)

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