public async Task <BulkCreateQueueMessagesCommandResponse> Handle(BulkCreateQueueMessagesCommand query) { await _cosmosDbContext.BulkCreateQueueMessagesAsync(query.Messages); return(new BulkCreateQueueMessagesCommandResponse()); }
private async Task AddMessagesToDatabase(IEnumerable <QueueMessage> messages) { _logger.LogInformation($"# of messages bulk created: {messages.Count()}"); await _cosmosDbContext.BulkCreateQueueMessagesAsync(messages); }