InMemoryDbContextOptionsBuilder.EnableNullChecks(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enables nullability check for all properties across all entities within the in-memory database.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.InMemoryDbContextOptionsBuilder EnableNullChecks (bool nullChecksEnabled = true);
abstract member EnableNullChecks : bool -> Microsoft.EntityFrameworkCore.Infrastructure.InMemoryDbContextOptionsBuilder
override this.EnableNullChecks : bool -> Microsoft.EntityFrameworkCore.Infrastructure.InMemoryDbContextOptionsBuilder
Public Overridable Function EnableNullChecks (Optional nullChecksEnabled As Boolean = true) As InMemoryDbContextOptionsBuilder
Parameters
- nullChecksEnabled
- Boolean
If true
, then nullability check is enforced.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Using DbContextOptions, and The EF Core in-memory database provider for more information and examples.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för