Документация

This commit is contained in:
2025-10-04 22:52:22 +04:00
parent 5ded786397
commit 318abe541c
1224 changed files with 4656 additions and 4233 deletions
@@ -14,17 +14,17 @@ protected override void OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOpt
<a name='Pf2e.Database.Pf2eDbContext.OnConfiguring(Microsoft.EntityFrameworkCore.DbContextOptionsBuilder).optionsBuilder'></a>
`optionsBuilder` [Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbContextOptionsBuilder 'Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder')
`optionsBuilder` [Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontextoptionsbuilder 'Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder')
A builder used to create or modify options for this context\. Databases \(and other extensions\)
typically define extension methods on this object that allow you to configure the context\.
### Remarks
In situations where an instance of [Microsoft\.EntityFrameworkCore\.DbContextOptions](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbContextOptions 'Microsoft\.EntityFrameworkCore\.DbContextOptions') may or may not have been passed
to the constructor, you can use [Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.IsConfigured](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbContextOptionsBuilder.IsConfigured 'Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.IsConfigured') to determine if
In situations where an instance of [Microsoft\.EntityFrameworkCore\.DbContextOptions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontextoptions 'Microsoft\.EntityFrameworkCore\.DbContextOptions') may or may not have been passed
to the constructor, you can use [Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.IsConfigured](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontextoptionsbuilder.isconfigured 'Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\.IsConfigured') to determine if
the options have already been set, and skip some or all of the logic in
[Microsoft\.EntityFrameworkCore\.DbContext\.OnConfiguring\(Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\)](https://docs.microsoft.com/en-us/dotnet/api/Microsoft.EntityFrameworkCore.DbContext.OnConfiguring#Microsoft_EntityFrameworkCore_DbContext_OnConfiguring_Microsoft_EntityFrameworkCore_DbContextOptionsBuilder_ 'Microsoft\.EntityFrameworkCore\.DbContext\.OnConfiguring\(Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\)').
[Microsoft\.EntityFrameworkCore\.DbContext\.OnConfiguring\(Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\)](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.dbcontext.onconfiguring#microsoft-entityframeworkcore-dbcontext-onconfiguring(microsoft-entityframeworkcore-dbcontextoptionsbuilder) 'Microsoft\.EntityFrameworkCore\.DbContext\.OnConfiguring\(Microsoft\.EntityFrameworkCore\.DbContextOptionsBuilder\)').
See [DbContext lifetime, configuration, and initialization](https://aka.ms/efcore-docs-dbcontext 'https://aka\.ms/efcore\-docs\-dbcontext')
for more information and examples.