I would like to make a new Structure Group when we create a new Folder. In older versions of Tridion we might do this with the TDSE object.
I'm on Tridion Sites 9 and wanted to use something similar and tried with the following code.
StructureGroup newSg = (StructureGroup) session.GetNewObject();
Error CS0311 The type
be used as type parameter 'T' in the generic type or method
'Session.GetNewObject()'. There is no implicit reference conversion
Is my only option here to use the Tridion Core Service?