-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow extending ConfigureConventions and OnModelCreating #19236
Conversation
…ework/abp into salihozkara/abpDbContext
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #19236 +/- ##
==========================================
- Coverage 51.55% 51.53% -0.03%
==========================================
Files 3097 3097
Lines 98420 98499 +79
Branches 7862 7880 +18
==========================================
+ Hits 50741 50760 +19
- Misses 46120 46178 +58
- Partials 1559 1561 +2 ☔ View full report in Codecov by Sentry. |
hi @salihozkara I added a new commit. What do you think? |
Hi @maliming |
hi
The |
The user will need to override it like this: var oldAction = options.DefaultConventionAction;
options.DefaultConventionAction = (dbContext, builder) =>
{
oldAction?.Invoke(dbContext, builder);
// my code
}; If you find it suitable, it's not a problem for me. My other question is about the 'order' that was present before. Is there a specific reason for removing it? |
The |
Description
Users will need to replace these methods on a per-DbContext basis when they require them. Instead of replacement, methods can be extended using options. In our case, we utilized citext to ensure case-insensitivity for strings in Postgres SQL. However, this change was effective only when applied to abp.io's own DbContext; even if other DbContexts used citext in the database, case sensitivity was not addressed. Subsequently, after replacing all DbContexts and configuring this change within each, our issue was resolved. Given the potential workload of replacing and maintaining all DbContexts, employing such a method would be more ideal.
Example usage:
Checklist