From c615b355a58d48c83d18291af2a3d3c21fa5d807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Thierry=20K=C3=A9chichian?= Date: Fri, 4 Aug 2023 05:21:07 +0200 Subject: [PATCH] Invalid casts (#14059) --- .../Services/IWorkflowStore.cs | 2 +- .../Services/IWorkflowTypeStore.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowStore.cs b/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowStore.cs index 8ab9a07ebc9..0e372b15380 100644 --- a/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowStore.cs +++ b/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowStore.cs @@ -27,6 +27,6 @@ public static class WorkflowStoreExtensions { [Obsolete("This method will be removed in a future version, use the method accepting a collection of long ids.", false)] public static Task> GetAsync(this IWorkflowStore store, IEnumerable ids) => - store.GetAsync(ids.Cast()); + store.GetAsync(ids.Select(id => Convert.ToInt64(id))); } } diff --git a/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowTypeStore.cs b/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowTypeStore.cs index 5ca8db480da..55482deda17 100644 --- a/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowTypeStore.cs +++ b/src/OrchardCore/OrchardCore.Workflows.Abstractions/Services/IWorkflowTypeStore.cs @@ -21,6 +21,6 @@ public static class WorkflowTypeStoreExtensions { [Obsolete("This method will be removed in a future version, use the method accepting a collection of long ids.", false)] public static Task> GetAsync(this IWorkflowTypeStore store, IEnumerable ids) => - store.GetAsync(ids.Cast()); + store.GetAsync(ids.Select(id => Convert.ToInt64(id))); } }