public async Task <BulkCreateQueueMessagesCommandResponse> Handle(BulkCreateQueueMessagesCommand query)
        {
            await _cosmosDbContext.BulkCreateQueueMessagesAsync(query.Messages);

            return(new BulkCreateQueueMessagesCommandResponse());
        }
示例#2
0
 private async Task AddMessagesToDatabase(IEnumerable <QueueMessage> messages)
 {
     _logger.LogInformation($"# of messages bulk created: {messages.Count()}");
     await _cosmosDbContext.BulkCreateQueueMessagesAsync(messages);
 }