語言

ManyToManyAssociationMappingConfiguration.HasTableAnnotation 方法

定義

在模型中為連接表設置註解。 註解值之後可以在處理資料表時使用,例如建立遷移時。

public System.Data.Entity.ModelConfiguration.Configuration.ManyToManyAssociationMappingConfiguration HasTableAnnotation(string name, object value);
member this.HasTableAnnotation : string * obj -> System.Data.Entity.ModelConfiguration.Configuration.ManyToManyAssociationMappingConfiguration
Public Function HasTableAnnotation (name As String, value As Object) As ManyToManyAssociationMappingConfiguration

參數

name
String

註解名稱必須是有效的 C#/EDM 識別碼。

value
Object

註解值,可能是字串或其他可序列化的類型 IMetadataAnnotationSerializer

傳回

使用相同的設定實例,以便可以串接多個呼叫。

備註

如果註解值的型別不是字串,可能需要註冊 a IMetadataAnnotationSerializer 。 傳遞空值會清除先前設定的欄位上任何帶有該名稱的註解。

適用於