Example #1
0
        public async Task RegisterAsync()
        {
            try
            {
                var installed = new InstalledDomainSerializer();

                foreach (var domain in installed.Get())
                {
                    string database = TenantConvention.GetDbNameByConvention(domain.DomainName);
                    await InstalledDomains.AddAsync(database, domain.DomainName, domain.AdminEmail).ConfigureAwait(false);
                }
            }
            catch (Exception ex)
            {
                Log.Error("Could not execute AddInstalledDomainProcedure. Exception: {Exception}", ex);
            }
        }
Example #2
0
        public void Register()
        {
            try
            {
                var installed = new DomainSerializer("DomainsInstalled.json");

                foreach (var domain in installed.Get())
                {
                    string database = DbConvention.GetDbNameByConvention(domain.DomainName);
                    InstalledDomains.Add(database, domain.DomainName, domain.AdminEmail);
                }
            }
            catch (Exception ex)
            {
                Log.Error("Could not execute AddInstalledDomainProcedure. Exception: {Exception}", ex);
            }
        }