[英]Using RefactorThis.GraphDiff library
I have the following tables in my database 我的数据库中有以下表格
And a graph mapping of (table address not shown in image) : 和(表地址未在图中显示)的图形映射:
.OwnedEntity(s => s.Address)
.OwnedCollection(s => s.SiteActivityPlants)
.OwnedCollection(s => s.SiteActivityPlants, with => with.AssociatedCollection(d => d.SiteActivityPlantNotes))
What I am trying to do is update the data in table SiteActivityPlantNotes. 我正在尝试做的是更新表SiteActivityPlantNotes中的数据。
After looking at Documentation , AssociatedCollection just updates the reference, what I need to do is update the data records within SiteActivityPlantNotes. 在查看Documentation之后 ,AssociatedCollection只是更新了引用,我需要做的是更新SiteActivityPlantNotes中的数据记录。
Is this possible? 这可能吗?
2 Changes in your code should do it: 2在代码中进行更改应执行以下操作:
Final Code: 最终代码:
.OwnedEntity(s => s.Address)
.OwnedCollection(s => s.SiteActivityPlants, with => with.OwnedCollection(d => d.SiteActivityPlantNotes))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.