PropertyBuilder<TProperty>.HasAnnotation(String, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 屬性上加入或更新批註。 如果 中 annotation
指定索引鍵的注釋已經存在,其值將會更新。
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasAnnotation (string annotation, object value);
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasAnnotation (string annotation, object? value);
override this.HasAnnotation : string * obj -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
Public Overridable Function HasAnnotation (annotation As String, value As Object) As PropertyBuilder(Of TProperty)
參數
- annotation
- String
要加入或更新之批註的索引鍵。
- value
- Object
要儲存在批註中的值。
傳回
相同的產生器實例,以便鏈結多個組態呼叫。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應