Share via


RelationshipManager.OnSerializing 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

由对象服务调用,用来准备 EntityKey 以序列化关系进行二进制序列化。

命名空间:  System.Data.Entity.Core.Objects.DataClasses
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
<SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")> _
<BrowsableAttribute(False)> _
<OnSerializingAttribute> _
Public Sub OnSerializing ( _
    context As StreamingContext _
)
用法
Dim instance As RelationshipManager 
Dim context As StreamingContext

instance.OnSerializing(context)
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")]
[BrowsableAttribute(false)]
[OnSerializingAttribute]
public void OnSerializing(
    StreamingContext context
)
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA2238:ImplementSerializationMethodsCorrectly")]
[BrowsableAttribute(false)]
[OnSerializingAttribute]
public:
void OnSerializing(
    StreamingContext context
)
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
[<SuppressMessageAttribute("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")>]
[<BrowsableAttribute(false)>]
[<OnSerializingAttribute>]
member OnSerializing : 
        context:StreamingContext -> unit
public function OnSerializing(
    context : StreamingContext
)

参数

请参阅

参考

RelationshipManager 类

System.Data.Entity.Core.Objects.DataClasses 命名空间