Getting started with MObject.apex
Persistence
Carrying out persistence is only one call and MObject.apex will do everything for you behind the scene.
Pricebook2 pb = [ ... ];
MObject mo = MObject.create(pb);
mo.put('Opportunities', new List{ ... });
mo.persist(); Or you can persist a list of MObjects at one time.
List mos = MObject.createList(new List{ ... });
MObject.persist(mos);