public int SaveAlias(Alias alias) { using (var db = new DbManager(_csName)) { var aliasDao = new AliasDao(db); return(aliasDao.Save(alias)); } }
public int SaveAlias(Alias alias) { using (var db = DbManager.FromHttpContext(_csName)) { var aliasDao = new AliasDao(db); return(aliasDao.Save(alias)); } }
public void SaveMailbox(Mailbox mailbox, Alias address, bool deliver = true) { using (var db = new DbManager(_csName)) { using (var tx = db.BeginTransaction(IsolationLevel.ReadUncommitted)) { var mailboxDao = new MailboxDao(db); mailboxDao.Save(mailbox, deliver); var aliasDao = new AliasDao(db); aliasDao.Save(address); tx.Commit(); } } }