作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有谁知道以特定顺序同步多个表的方法。详细地说,父表和子表中都有新创建的数据,它要求父插入发生在子表之前。
最佳答案
每个表的处理顺序取决于其SyncTable
的顺序。对象已添加到同步代理的表集合中。
下表在订单表之前添加了客户表。
SyncGroup customerOrderSyncGroup = new SyncGroup("CustomerOrder");
SyncTable customerSyncTable = new SyncTable("Customer");
customerSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
customerSyncTable.SyncDirection = SyncDirection.DownloadOnly;
customerSyncTable.SyncGroup = customerOrderSyncGroup;
this.Configuration.SyncTables.Add(customerSyncTable);
SyncTable orderSyncTable = new SyncTable("Order");
orderSyncTable.CreationOption = TableCreationOption.DropExistingOrCreateNewTable;
orderSyncTable.SyncDirection = SyncDirection.DownloadOnly;
orderSyncTable.SyncGroup = customerOrderSyncGroup;
this.Configuration.SyncTables.Add(orderSyncTable);
关于frameworks - 同步框架 : How to specify the sync order of multiple tables?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2178269/
我是一名优秀的程序员,十分优秀!