共用方式為


RelationalValueGenerationConvention.MappingStrategyAllowsValueGeneration 方法

定義

檢查對應策略和屬性是否允許依慣例產生值。

protected virtual bool MappingStrategyAllowsValueGeneration (Microsoft.EntityFrameworkCore.Metadata.IConventionProperty property, string? mappingStrategy);
abstract member MappingStrategyAllowsValueGeneration : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string -> bool
override this.MappingStrategyAllowsValueGeneration : Microsoft.EntityFrameworkCore.Metadata.IConventionProperty * string -> bool
Protected Overridable Function MappingStrategyAllowsValueGeneration (property As IConventionProperty, mappingStrategy As String) As Boolean

參數

property
IConventionProperty

要考慮產生值的 屬性。

mappingStrategy
String

目前的對應策略。

傳回

true 如果允許產生值,則為 ; false 否則。

適用於