The issue only relates to azurite as using an actual Azure table works fine. I noticed searching in azurite doesn't return ETag for any entity.
Using the below entity, TableOperation.Insert
always succeeds but always returns Conflict
409
, even though the new entity was added to the table.
TableOperation.InsertOrReplace
always succeeds and doesn't throw an exception.
There are no duplicates in the table so there's no obvious reason why Insert
should fail and InsertOrReplace
should succeed. Is there any reason why Insert
would succeed and fail at the same time?
public class MessageQEntity : TableEntity
{
public string Message { get; set; }
public string Status { get; set; }
public MessageQEntity()
{
PartitionKey = "Region";
RowKey = Guid.NewGuid().ToString();
}
}