Exemple #1
0
 public virtual void Update(WebhookSendAttempt webhookSendAttempt)
 {
     using (_unitOfWorkManager.Current.SetTenantId(webhookSendAttempt.TenantId))
     {
         _webhookSendAttemptRepository.Update(webhookSendAttempt);
         _unitOfWorkManager.Current.SaveChanges();
     }
 }
Exemple #2
0
        public virtual async Task UpdateAsync(WebhookSendAttempt webhookSendAttempt)
        {
            using (_unitOfWorkManager.Current.SetTenantId(webhookSendAttempt.TenantId))
            {
                await _webhookSendAttemptRepository.UpdateAsync(webhookSendAttempt);

                await _unitOfWorkManager.Current.SaveChangesAsync();
            }
        }
Exemple #3
0
        public virtual void Insert(WebhookSendAttempt webhookSendAttempt)
        {
            using (var uow = _unitOfWorkManager.Begin())
            {
                using (_unitOfWorkManager.Current.SetTenantId(webhookSendAttempt.TenantId))
                {
                    _webhookSendAttemptRepository.Insert(webhookSendAttempt);
                    _unitOfWorkManager.Current.SaveChanges();
                }

                uow.Complete();
            }
        }
        protected virtual Guid InsertAndGetIdWebhookSendAttempt(WebhookSenderArgs webhookSenderArgs)
        {
            var workItem = new WebhookSendAttempt
            {
                WebhookEventId        = webhookSenderArgs.WebhookEventId,
                WebhookSubscriptionId = webhookSenderArgs.WebhookSubscriptionId,
                TenantId = webhookSenderArgs.TenantId
            };

            WebhookSendAttemptStore.Insert(workItem);
            CurrentUnitOfWork.SaveChanges();

            return(workItem.Id);
        }
Exemple #5
0
        public virtual async Task InsertAsync(WebhookSendAttempt webhookSendAttempt)
        {
            using (var uow = _unitOfWorkManager.Begin())
            {
                using (_unitOfWorkManager.Current.SetTenantId(webhookSendAttempt.TenantId))
                {
                    await _webhookSendAttemptRepository.InsertAsync(webhookSendAttempt);

                    await _unitOfWorkManager.Current.SaveChangesAsync();
                }

                await uow.CompleteAsync();
            }
        }
        protected virtual async Task <Guid> InsertAndGetIdWebhookSendAttemptAsync(WebhookSenderArgs webhookSenderArgs)
        {
            var workItem = new WebhookSendAttempt
            {
                WebhookEventId        = webhookSenderArgs.WebhookEventId,
                WebhookSubscriptionId = webhookSenderArgs.WebhookSubscriptionId,
                TenantId = webhookSenderArgs.TenantId
            };

            await WebhookSendAttemptStore.InsertAsync(workItem);

            await CurrentUnitOfWork.SaveChangesAsync();

            return(workItem.Id);
        }
        public virtual async Task <Guid> InsertAndGetIdWebhookSendAttemptAsync(WebhookSenderArgs webhookSenderArgs)
        {
            using (var uow = UnitOfWorkManager.Begin())
            {
                var workItem = new WebhookSendAttempt
                {
                    WebhookEventId        = webhookSenderArgs.WebhookEventId,
                    WebhookSubscriptionId = webhookSenderArgs.WebhookSubscriptionId,
                    TenantId = webhookSenderArgs.TenantId
                };

                await _webhookSendAttemptStore.InsertAsync(workItem);

                await CurrentUnitOfWork.SaveChangesAsync();

                await uow.CompleteAsync();

                return(workItem.Id);
            }
        }
 public void Update(WebhookSendAttempt webhookSendAttempt)
 {
 }
 public Task UpdateAsync(WebhookSendAttempt webhookSendAttempt)
 {
     return(Task.CompletedTask);
 }
 public void Insert(WebhookSendAttempt webhookSendAttempt)
 {
 }
 public Task InsertAsync(WebhookSendAttempt webhookSendAttempt)
 {
     return(Task.CompletedTask);
 }