コード例 #1
0
        public void RemoveDomain(string domain, bool withStorageClean = true)
        {
            if (withStorageClean)
            {
                ClearDomainStorageSpace(domain);
            }

            using (var db = new DbManager(_csName))
            {
                using (var tx = db.BeginTransaction(IsolationLevel.ReadUncommitted))
                {
                    var aliasDao = new AliasDao(db);

                    aliasDao.RemoveByDomain(domain);

                    var mailboxDao = new MailboxDao(db);

                    mailboxDao.RemoveByDomain(domain);

                    var domainDao = new DomainDao(db);

                    domainDao.Remove(domain);

                    var dkimDao = new DkimDao(db);

                    dkimDao.Remove(domain);

                    tx.Commit();
                }
            }
        }
コード例 #2
0
        public int SaveDkim(Dkim dkim)
        {
            using (var db = new DbManager(_csName))
            {
                var dkimDao = new DkimDao(db);

                return(dkimDao.Save(dkim));
            }
        }
コード例 #3
0
        public int SaveDkim(Dkim dkim)
        {
            using (var db = DbManager.FromHttpContext(_csName))
            {
                var dkimDao = new DkimDao(db);

                return(dkimDao.Save(dkim));
            }
        }