コード例 #1
0
        public async Task <bool> DeleteAllNotes(string eventId)
        {
            bool result = await _repoNotes.DeleteItemsAsync(p => p.EventId == eventId);

            if (result)
            {
                _dictEvents[eventId] = null;
            }
            return(result);
        }
コード例 #2
0
        public async Task <bool> DeleteDeliveryForEvent(string eventId, string deliveryId)
        {
            bool result = await _repoDeliveries.DeleteItemsAsync(p => p.DeliveryId == deliveryId &&
                                                                 p.EventId == eventId);

            if (result)
            {
                _dictDeliveries?.Remove(eventId); // event deliveries will be reloaded on next 'get'
            }
            return(result);
        }
コード例 #3
0
        public async Task RemoveEventClusters()
        {
            ConsoleHelper.WriteInfo($"Removing eventclusters/responses/sagas...");
            await _repoEventClusters.DeleteItemsAsync(p => p.CreationDate != DateTime.MinValue);

            ConsoleHelper.WriteHighlight($"Eventclusters removed...");
            await _repoResponses.DeleteItemsAsync(p => p.CreationDate != DateTime.MinValue);

            ConsoleHelper.WriteHighlight($"Responses removed...");
            await _repoSagas.DeleteItemsAsync(p => p.Id != null);

            ConsoleHelper.WriteHighlight($"Sagas removed...");
            await Task.Delay(5000);
        }