

Public NotInheritable Class DatastoreConfiguration
public sealed class DatastoreConfiguration
{
// ApplicationOptions.EditingOptions.EnableEditingFromEditTab is true
// ApplicationOptions.EditingOptions.IsSingleWorkspaceEditSession is true
Geodatabase egdb = new Geodatabase(new DatabaseConnectionFile(new Uri("path\\to\\sde\\file\\sdefile.sde")));
// setup the configuration to edit the data registered as versioned in the egdb
var datastoreConfig = new DatastoreConfiguration(egdb, VersionState.Versioned);
// start the edit session on the workspace
var project = Project.Current;
var v_success = await project.SetSingleEditWorkspaceAsync(datastoreConfig);
// OR
// setup the configuration to edit the data that is not registered as versioned
var nonVersionedDatastoreConfig = new DatastoreConfiguration(egdb, VersionState.NonVersioned);
// start the edit session on the workspace
var nv_success = await project.SetSingleEditWorkspaceAsync(nonVersionedDatastoreConfig);
}
System.Object
ArcGIS.Core.Data.DatastoreConfiguration
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)