閱讀英文版本

分享方式:


TimestampAttributeConvention 類別

定義

將 屬性設定為並行權杖的慣例,如果 TimestampAttribute 套用至它。

C#
public class TimestampAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.PropertyAttributeConventionBase<System.ComponentModel.DataAnnotations.TimestampAttribute>
繼承

備註

如需詳細資訊和範例,請參閱 模型建置慣例

建構函式

屬性

Dependencies

此服務的相依性。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在複雜屬性新增至類似型別的物件之後呼叫。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)
ProcessComplexPropertyFieldChanged(IConventionComplexPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

在複雜屬性的支援欄位變更之後呼叫。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionComplexPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

在複雜屬性新增至具有相關聯 CLR 屬性或欄位屬性的類型之後呼叫。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, IConventionContext<IConventionPropertyBuilder>)

在屬性新增至實體類型之後呼叫。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, TAttribute, MemberInfo, IConventionContext)

在屬性新增至實體類型之後呼叫,該實體類型具有相關聯 CLR 屬性或欄位上的屬性。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)
ProcessPropertyAdded(IConventionPropertyBuilder, TimestampAttribute, MemberInfo, IConventionContext)

在屬性新增至實體類型之後呼叫,該實體類型具有相關聯 CLR 屬性或欄位上的屬性。

ProcessPropertyFieldChanged(IConventionPropertyBuilder, FieldInfo, FieldInfo, IConventionContext<FieldInfo>)

在屬性的支援欄位變更之後呼叫。

(繼承來源 PropertyAttributeConventionBase<TAttribute>)

適用於

產品 版本
Entity Framework Core 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0