语言

IClrCollectionAccessor.Add(Object, Object, Boolean) 方法

定义

将值添加到导航属性集合,除非它已包含在集合中。

public bool Add(object entity, object value, bool forMaterialization);
abstract member Add : obj * obj * bool -> bool
Public Function Add (entity As Object, value As Object, forMaterialization As Boolean) As Boolean

参数

entity
Object

实体实例。

value
Object

要添加的值。

forMaterialization
Boolean

如果 true,则会在查询具体化过程中添加该值。

返回

true 如果添加了值,则为 false 如果它已在集合中,

适用于