Skip to content

make the DtoGenerator is compatible with ImplicitUsings=false#304

Merged
baoduy merged 1 commit into
mainfrom
dev
Jun 22, 2026
Merged

make the DtoGenerator is compatible with ImplicitUsings=false#304
baoduy merged 1 commit into
mainfrom
dev

Conversation

@baoduy

@baoduy baoduy commented Jun 22, 2026

Copy link
Copy Markdown
Owner

This pull request primarily introduces global using directives to simplify code and removes redundant using statements from multiple files. Additionally, it makes minor project configuration updates for clarity and consistency.

Global Usings and Code Cleanup:

  • Added a GlobalUsings.cs file in DKNet.EfCore.DtoEntities to centralize common using directives, and removed now-redundant using statements from many entity and shared files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

  • Added a GlobalUsings.cs file for test projects to centralize test-related using directives.

Project Configuration Improvements:

  • Set <ImplicitUsings>false</ImplicitUsings> in both DKNet.EfCore.DtoEntities.csproj and EfCore.DtoGenerator.Tests.csproj to disable automatic implicit usings, ensuring that only explicitly defined or global usings are used. [1] [2]

  • Minor formatting and consolidation of MSBuild XML in EfCore.DtoGenerator.Tests.csproj for improved readability. [1] [2]

Other Minor Changes:

  • Added missing using System; in GenerateDtoAttribute.cs.
  • Minor whitespace addition to Order.cs.

@baoduy baoduy merged commit 61ac310 into main Jun 22, 2026
7 of 8 checks passed
@github-actions

Copy link
Copy Markdown

📊 Code Coverage Report

| Metric | Coverage |
|--------|----------|
| **Line Coverage** | 87.7% |
| **Branch Coverage** | 80.4% |
| **Method Coverage** | 85.9% |

**Lines:** 3257/undefined covered
**Branches:** 1209/undefined covered

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

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.13%. Comparing base (8e08990) to head (09aeacd).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #304      +/-   ##
==========================================
- Coverage   84.15%   84.13%   -0.03%     
==========================================
  Files         159      159              
  Lines        3712     3712              
  Branches      574      574              
==========================================
- Hits         3124     3123       -1     
  Misses        412      412              
- Partials      176      177       +1     
Flag Coverage Δ
unittests 84.13% <ø> (-0.03%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

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