public int RemoveAlias(string alias) { using (var db = new DbManager(_csName)) { var aliasDao = new AliasDao(db); return(aliasDao.Remove(alias)); } }
public int RemoveAlias(string alias) { using (var db = DbManager.FromHttpContext(_csName)) { var aliasDao = new AliasDao(db); return(aliasDao.Remove(alias)); } }
public void RemoveMailbox(string address) { var mailAddress = new MailAddress(address); ClearMailboxStorageSpace(mailAddress.User, mailAddress.Host); using (var db = new DbManager(_csName)) { using (var tx = db.BeginTransaction(IsolationLevel.ReadUncommitted)) { var mailboxDao = new MailboxDao(db); mailboxDao.Remove(address); var aliasDao = new AliasDao(db); aliasDao.Remove(address); tx.Commit(); } } }