Browse Source

Update index.md

pull/22951/head
maliming 1 year ago
committed by GitHub
parent
commit
8d30313e9a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 31
      docs/en/framework/data/entity-framework-core/index.md

31
docs/en/framework/data/entity-framework-core/index.md

@ -142,24 +142,27 @@ Configure<AbpDbContextOptions>(options =>
Add actions for the `ConfigureConventions` and `OnModelCreating` methods of the `DbContext` as shown below:
````csharp
options.ConfigureDefaultConvention((dbContext, builder) =>
Configure<AbpDbContextOptions>(options =>
{
// This action is called for ConfigureConventions method of all DbContexts.
});
options.ConfigureDefaultConvention((dbContext, builder) =>
{
// This action is called for ConfigureConventions method of all DbContexts.
});
options.ConfigureConventions<YourDbContext>((dbContext, builder) =>
{
// This action is called for ConfigureConventions method of specific DbContext.
});
options.ConfigureConventions<YourDbContext>((dbContext, builder) =>
{
// This action is called for ConfigureConventions method of specific DbContext.
});
options.ConfigureDefaultOnModelCreatingAction ( (dbContext, builder) =>
{
// This action is called for OnModelCreating method of all DbContexts.
});
options.ConfigureDefaultOnModelCreating((dbContext, builder) =>
{
// This action is called for OnModelCreating method of all DbContexts.
});
options.ConfigureOnModelCreating<YourDbContext>((dbContext, builder) =>
{
// This action is called for OnModelCreating method of specific DbContext.
options.ConfigureOnModelCreating<YourDbContext>((dbContext, builder) =>
{
// This action is called for OnModelCreating method of specific DbContext.
});
});
````

Loading…
Cancel
Save