private async Task ChangePackStatusToReadyToSend(PackToDelivery pack, int orderId) { pack.PackStatus = PackStatus.Ready_To_Send; await packToDeliveryRepo.SaveAllAsync(); await bus.Publish(new ChangeOrderStatusEvent(orderId, OrderStatus.ReadyToSend)); }
private async Task SaveChanges() { try { await packToDeliveryRepo.SaveAllAsync(); } catch (Exception ex) { logger.LogError(ex.Message); throw; } }