Глобальный рефакторинг пространств имён

This commit is contained in:
2025-10-02 13:29:30 +04:00
parent d23d81fb53
commit 2fa94851cb
3176 changed files with 27146 additions and 30584 deletions
@@ -0,0 +1,29 @@
#### [Pf2e\.Database](index.md 'index')
### [Pf2e\.Database](Pf2e.Database.md 'Pf2e\.Database').[Pf2eDbContext](Pf2eDbContext.md 'Pf2e\.Database\.Pf2eDbContext')
## Pf2eDbContext\.OnModelCreating\(ModelBuilder\) Method
Override this method to further configure the model that was discovered by convention from the entity types
exposed in [Microsoft\.EntityFrameworkCore\.DbSet<>](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbSet-1 'Microsoft\.EntityFrameworkCore\.DbSet\`1') properties on your derived context\. The resulting model may be cached
and re\-used for subsequent instances of your derived context\.
```csharp
protected override void OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder);
```
#### Parameters
<a name='Pf2e.Database.Pf2eDbContext.OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder).modelBuilder'></a>
`modelBuilder` [Microsoft\.EntityFrameworkCore\.ModelBuilder](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.ModelBuilder 'Microsoft\.EntityFrameworkCore\.ModelBuilder')
The builder being used to construct the model for this context\. Databases \(and other extensions\) typically
define extension methods on this object that allow you to configure aspects of the model that are specific
to a given database\.
### Remarks
If a model is explicitly set on the options for this context (via [Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.UseModel\(Microsoft\.EntityFrameworkCore\.Metadata\.IModel\)](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.UseModel#Microsoft_EntityFrameworkCore_DbContextOptionsBuilder_UseModel_Microsoft_EntityFrameworkCore_Metadata_IModel_ 'Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.UseModel\(Microsoft\.EntityFrameworkCore\.Metadata\.IModel\)'))
then this method will not be run. However, it will still run when creating a compiled model.
See [Modeling entity types and relationships](https://aka.ms/efcore-docs-modeling 'https://aka\.ms/efcore\-docs\-modeling') for more information and
examples.