public async Task <ActionResult> CreateSubscriptionAsync(string topicKeyName, string subscriptionKeyName) { if (await _serviceBusService.SubscriptionExistAsync(topicKeyName, subscriptionKeyName)) { var subscription = await _serviceBusService.GetSubscriptionAsync(topicKeyName, subscriptionKeyName); return(Ok(subscription)); } var result = await _serviceBusService.CreateSubscriptionAsync(topicKeyName, subscriptionKeyName); await _topicRepository.AddTopicLogAsync(new TopicLog() { TopicName = topicKeyName, SubscriptionName = subscriptionKeyName, Action = TopicAction.CreateSubscription }); return(Ok(result)); }