删除关系?

发布于 2024-08-11 21:18:45 字数 152 浏览 3 评论 0原文

其反面是什么:

Dim ad As New Address
Person.AddressReference.Attach(ad)

我的意思是如何删除 Person.Address? (删除和不删除 - 意思是只删除关系)?

What is the opposite of:

Dim ad As New Address
Person.AddressReference.Attach(ad)

I mean how do I delete the Person.Address? (both with deleting and without - meaning only delete the relation)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十级心震 2024-08-18 21:18:45

我不会VB,所以如果我的语法不太正确,请原谅我。

要“附加”:

Person.Address = ad

要“分离”

Person.Address = Nothing

如果要删除,请执行以下操作:

Context.DeleteObject(ad)

I don't do VB, so forgive me if my syntax isn't quite right.

To "attach":

Person.Address = ad

To "detach"

Person.Address = Nothing

If you want to delete, then do:

Context.DeleteObject(ad)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文