public async Task <bool> DeleteAllNotes(string eventId) { bool result = await _repoNotes.DeleteItemsAsync(p => p.EventId == eventId); if (result) { _dictEvents[eventId] = null; } return(result); }
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); }
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); }