Save data CoreData

Hello, I have class file, which should save data coreData and Im only able to save data via ui. Do you have any example, how can I save data in core data via class files?

Greeting Fabian

Save data CoreData
 
 
Q