AddAttachment(RowToken,String) Method
Edit Operation add attachment via RowToken
//ArcGIS Pro 2.5 extends the EditOperation.AddAttachment method to take a RowToken as a paramter.
//This allows you to create a feature, using EditOperation.CreateEx, and add an attachment in one transaction.
var editOpAttach = new EditOperation();
editOperation1.Name = string.Format("Create point in '{0}'", CurrentTemplate.Layer.Name);
var attachRowToken = editOpAttach.Create(this.CurrentTemplate, polygon);
editOpAttach.AddAttachment(attachRowToken, @"c:\temp\image.jpg");
//Must be within a QueuedTask
editOpAttach.Execute();
Target Platforms: Windows 11, Windows 10, Windows 8.1
ArcGIS Pro version: 2.5 or higher.