ModelValidator.ValidateNonNullPrimaryKeys 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.
Overloads
ValidateNonNullPrimaryKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>) |
Validates that all trackable entity types have a primary key. |
ValidateNonNullPrimaryKeys(IModel) |
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases. |
ValidateNonNullPrimaryKeys(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
Validates that all trackable entity types have a primary key.
protected virtual void ValidateNonNullPrimaryKeys (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
abstract member ValidateNonNullPrimaryKeys : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateNonNullPrimaryKeys : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Protected Overridable Sub ValidateNonNullPrimaryKeys (model As IModel, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))
Parameters
- model
- IModel
The model to validate.
The logger to use.
Applies to
ValidateNonNullPrimaryKeys(IModel)
- Source:
- ModelValidator.cs
- Source:
- ModelValidator.cs
This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.
protected virtual void ValidateNonNullPrimaryKeys (Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member ValidateNonNullPrimaryKeys : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
override this.ValidateNonNullPrimaryKeys : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
Protected Overridable Sub ValidateNonNullPrimaryKeys (model As IModel)
Parameters
- model
- IModel
Applies to
Entity Framework