我正在尝试为我们的 CRM 实体之一实施批处理。
我有 2 个场景 1. 添加实体记录,然后更新相同的实体记录(因为我们不能添加非活动记录,所以需要第二次调用使其处于非活动状态)。2.获取实体记录并将其与另一个实体取消链接。
示例代码如下:
var record = client.For<entity1>().Filter(p => p.primaryKey == inputParam.entity1.primaryKey).
Set(new { statecode = 0 }).InsertEntryAsync(false);
client.For<entity1>().Filter(p => p.primaryKey == record.primaryKey).
Set(new { statecode = 1 }).UpdateEntryAsync(false);
另外请让我知道是否有可能使用 Odata Batch 检索记录和更新记录。
我正在使用 simple.Odata.Client 库。
谢谢。帕里托什