public virtual async Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName)
        {
            var tenant = await TenantRepository.GetAsync(tenantConnectionGetByName.Id);

            tenant.RemoveConnectionString(tenantConnectionGetByName.Name);

            var updateEventData = new UpdateEventData
            {
                Id         = tenant.Id,
                OriginName = tenant.Name,
                Name       = tenant.Name
            };
            await EventBus.PublishAsync(updateEventData);

            await TenantRepository.UpdateAsync(tenant);
        }
        public virtual async Task <TenantConnectionStringDto> GetConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName)
        {
            var tenant = await TenantRepository.GetAsync(tenantConnectionGetByName.Id);

            var tenantConnectionString = tenant.FindConnectionString(tenantConnectionGetByName.Name);

            return(new TenantConnectionStringDto
            {
                Name = tenantConnectionGetByName.Name,
                Value = tenantConnectionString
            });
        }
Beispiel #3
0
 public virtual Task DeleteConnectionStringAsync(TenantConnectionGetByNameInputDto tenantConnectionGetByName)
 {
     return(TenantAppService.DeleteConnectionStringAsync(tenantConnectionGetByName));
 }