static void CreateSendPortGroup() { BtsCatalogExplorer root = new BtsCatalogExplorer(); try { root.ConnectionString = "Integrated Security=SSPI;database=BizTalkMgmtDb;server=YOURSERVER"; //create a new send port group SendPortGroup mySendPortGroup = root.AddNewSendPortGroup(); mySendPortGroup.Name = "My Send Port Group"; //try to commit the changes we made so far. If it fails, roll-back //everything we have done so far root.SaveChanges(); } catch (Exception e) { root.DiscardChanges(); throw e; } }