I working a project .NET core 6.0 Console with Simple.OData.Client. Just try the sample code - ODATA Batch Request and got error:
Operator '+=' cannot be applied to operands of type 'ODataBatch' and 'lambda expression'
Very sorry if I'm missing something obvious, but when I attempt to create a batch using the untyped syntax shown on the Wiki, I get an error that states Operator '+=' cannot be applied to operands of type 'ODataBatch' and 'lambda expression'. The code I'm using is the example code from the Wiki, shown below:
var batch = new ODataBatch(serviceUri);
batch += c => c.InsertEntryAsync(
"Products",
new Entry()
{
{ "ProductName", "Test1" },
{ "UnitPrice", 21m }
},
false);
await batch.ExecuteAsync();
I know I'm probably missing something simple and obvious here, but any help would be appreciated. I've tried a few things to make this work, but have failed to resolve the issue.
Thanks!