Example #1
0
        public int RemoveAlias(string alias)
        {
            using (var db = new DbManager(_csName))
            {
                var aliasDao = new AliasDao(db);

                return(aliasDao.Remove(alias));
            }
        }
Example #2
0
        public int RemoveAlias(string alias)
        {
            using (var db = DbManager.FromHttpContext(_csName))
            {
                var aliasDao = new AliasDao(db);

                return(aliasDao.Remove(alias));
            }
        }
Example #3
0
        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();
                }
            }
        }