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(); } } }
public int SaveDkim(Dkim dkim) { using (var db = new DbManager(_csName)) { var dkimDao = new DkimDao(db); return(dkimDao.Save(dkim)); } }
public int SaveDkim(Dkim dkim) { using (var db = DbManager.FromHttpContext(_csName)) { var dkimDao = new DkimDao(db); return(dkimDao.Save(dkim)); } }