开发者

Delete a relationship?

开发者 https://www.devze.com 2022-12-11 15:55 出处:网络
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 delet开发者_运维百科ing and without - meaning only delete the

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 delet开发者_运维百科ing and without - meaning only delete the relation)?


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消