Skip to content

Drop dependency on EF Core internals #1492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Conversation

bkoelman
Copy link
Member

@bkoelman bkoelman commented Mar 5, 2024

This fixes a warning in one of the samples when using EF Core 9 (preview 1), to not depend on EF Core internals. The fix also avoids the need for dealing with a breaking change in EF Core 9, and it optimizes to build the model only once at startup.

Furthermore, this PR reduces cohesion by internally depending on IReadOnlyModel instead of IModel.

QUALITY CHECKLIST

  • Changes implemented in code
  • Complies with our contributing guidelines
  • N/A: Adapted tests
  • N/A: Documentation updated

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 98.03922% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 90.75%. Comparing base (06d6b18) to head (3bf9157).

Files Patch % Lines
...ionToSql/DataModel/FromEntitiesDataModelService.cs 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1492   +/-   ##
=======================================
  Coverage   90.74%   90.75%           
=======================================
  Files         344      344           
  Lines       11003    11006    +3     
  Branches     1805     1806    +1     
=======================================
+ Hits         9985     9988    +3     
  Misses        669      669           
  Partials      349      349           

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

@bkoelman bkoelman marked this pull request as ready for review March 5, 2024 20:09
@bkoelman bkoelman merged commit ae0129e into master Mar 5, 2024
16 checks passed
@bkoelman bkoelman deleted the readonly-entity-model branch March 5, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant