From cf1394540c30a1baa6f46d1f1dfc380aa8545d6b Mon Sep 17 00:00:00 2001 From: ivan132 Date: Thu, 22 May 2025 21:16:56 +0800 Subject: [PATCH] =?UTF-8?q?configure=20via=20ConfigureDefaultConvention()?= =?UTF-8?q?=20and=20ConfigureDefaultOnModelCreating().=E2=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DefaultConventionAction and DefaultOnModelCreatingAction properties have internal access modifiers and cannot be accessed directly. They can only be configured through the ConfigureDefaultConvention() and ConfigureDefaultOnModelCreating() methods. --- docs/en/framework/data/entity-framework-core/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/framework/data/entity-framework-core/index.md b/docs/en/framework/data/entity-framework-core/index.md index a50edb2d4a..dc474de079 100644 --- a/docs/en/framework/data/entity-framework-core/index.md +++ b/docs/en/framework/data/entity-framework-core/index.md @@ -142,20 +142,20 @@ Configure(options => Add actions for the `ConfigureConventions` and `OnModelCreating` methods of the `DbContext` as shown below: ````csharp -options.DefaultConventionAction = (dbContext, builder) => +options.ConfigureDefaultConvention((dbContext, builder) => { // This action is called for ConfigureConventions method of all DbContexts. -}; +}); options.ConfigureConventions((dbContext, builder) => { // This action is called for ConfigureConventions method of specific DbContext. }); -options.DefaultOnModelCreatingAction = (dbContext, builder) => +options.ConfigureDefaultOnModelCreatingAction ( (dbContext, builder) => { // This action is called for OnModelCreating method of all DbContexts. -}; +}); options.ConfigureOnModelCreating((dbContext, builder) => { @@ -972,4 +972,4 @@ public class MyCustomEfCoreBulkOperationProvider * [Entities](../../architecture/domain-driven-design/entities.md) * [Repositories](../../architecture/domain-driven-design/repositories.md) -* [Video tutorial](https://abp.io/video-courses/essentials/abp-ef-core) \ No newline at end of file +* [Video tutorial](https://abp.io/video-courses/essentials/abp-ef-core)