SerializationExtensionMethods.SetAssociationAnnotations 方法
設定用於導覽屬性之序列化關聯的註釋。
命名空間: Microsoft.Data.Edm.Csdl
組件: Microsoft.Data.Edm (在 Microsoft.Data.Edm.dll 中)
語法
'宣告
<ExtensionAttribute> _
Public Shared Sub SetAssociationAnnotations ( _
model As IEdmModel, _
property As IEdmNavigationProperty, _
annotations As IEnumerable(Of IEdmDirectValueAnnotation), _
end1Annotations As IEnumerable(Of IEdmDirectValueAnnotation), _
end2Annotations As IEnumerable(Of IEdmDirectValueAnnotation), _
constraintAnnotations As IEnumerable(Of IEdmDirectValueAnnotation) _
)
'用途
Dim model As IEdmModel
Dim property As IEdmNavigationProperty
Dim annotations As IEnumerable(Of IEdmDirectValueAnnotation)
Dim end1Annotations As IEnumerable(Of IEdmDirectValueAnnotation)
Dim end2Annotations As IEnumerable(Of IEdmDirectValueAnnotation)
Dim constraintAnnotations As IEnumerable(Of IEdmDirectValueAnnotation)
model.SetAssociationAnnotations(property, _
annotations, end1Annotations, end2Annotations, _
constraintAnnotations)
public static void SetAssociationAnnotations(
this IEdmModel model,
IEdmNavigationProperty property,
IEnumerable<IEdmDirectValueAnnotation> annotations,
IEnumerable<IEdmDirectValueAnnotation> end1Annotations,
IEnumerable<IEdmDirectValueAnnotation> end2Annotations,
IEnumerable<IEdmDirectValueAnnotation> constraintAnnotations
)
[ExtensionAttribute]
public:
static void SetAssociationAnnotations(
IEdmModel^ model,
IEdmNavigationProperty^ property,
IEnumerable<IEdmDirectValueAnnotation^>^ annotations,
IEnumerable<IEdmDirectValueAnnotation^>^ end1Annotations,
IEnumerable<IEdmDirectValueAnnotation^>^ end2Annotations,
IEnumerable<IEdmDirectValueAnnotation^>^ constraintAnnotations
)
static member SetAssociationAnnotations :
model:IEdmModel *
property:IEdmNavigationProperty *
annotations:IEnumerable<IEdmDirectValueAnnotation> *
end1Annotations:IEnumerable<IEdmDirectValueAnnotation> *
end2Annotations:IEnumerable<IEdmDirectValueAnnotation> *
constraintAnnotations:IEnumerable<IEdmDirectValueAnnotation> -> unit
public static function SetAssociationAnnotations(
model : IEdmModel,
property : IEdmNavigationProperty,
annotations : IEnumerable<IEdmDirectValueAnnotation>,
end1Annotations : IEnumerable<IEdmDirectValueAnnotation>,
end2Annotations : IEnumerable<IEdmDirectValueAnnotation>,
constraintAnnotations : IEnumerable<IEdmDirectValueAnnotation>
)
參數
- model
型別:Microsoft.Data.Edm.IEdmModel
含導覽屬性的模型。
- property
型別:Microsoft.Data.Edm.IEdmNavigationProperty
導覽屬性。
- annotations
型別:System.Collections.Generic.IEnumerable<IEdmDirectValueAnnotation>
關聯註釋。
- end1Annotations
型別:System.Collections.Generic.IEnumerable<IEdmDirectValueAnnotation>
關聯端點 1 的註釋。
- end2Annotations
型別:System.Collections.Generic.IEnumerable<IEdmDirectValueAnnotation>
關聯端點 2 的註釋。
- constraintAnnotations
型別:System.Collections.Generic.IEnumerable<IEdmDirectValueAnnotation>
參考條件約束的註釋。
使用注意事項
在 Visual Basic 及 C# 中,您可以在任何型別 IEdmModel 的物件上將這個方法做為執行個體方法呼叫。使用執行個體方法語法呼叫這個方法時,請省略第一個參數。如需詳細資訊,請參閱 https://msdn.microsoft.com/zh-tw/library/bb384936(v=vs.103) 或 https://msdn.microsoft.com/zh-tw/library/bb383977(v=vs.103)。