public virtual async Task InsertSubscriptionAsync(PushRequestSubscription subscription)
        {
            using (UnitOfWorkManager.Current.SetTenantId(subscription.TenantId))
            {
                await SubscriptionRepository.InsertAsync(subscription);

                await UnitOfWorkManager.Current.SaveChangesAsync();
            }
        }
        public virtual Task InsertSubscriptionAsync(PushRequestSubscription subscription)
        {
            var pushSubscriptions = MultiTenantSubscriptions.GetOrAdd(subscription.TenantId, CreateSubscriptionCollection());

            if (pushSubscriptions.ContainsKey(subscription.Id))
            {
                throw new AbpException(string.Format("Subscription {0} already exists", subscription.Id));
            }

            subscription.Id = GuidGenerator.Create();
            if (!pushSubscriptions.TryAdd(subscription.Id, subscription))
            {
                throw new AbpException(string.Format("Failed to insert subscription {0}:{1}", subscription.PushRequestName, subscription.Id));
            }
            return(Task.CompletedTask);
        }
 public Task InsertSubscriptionAsync(PushRequestSubscription subscription)
 {
     return(Task.FromResult(0));
 }