You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use SelectMany over an object which is deserialized from a JSON but get this error:
Exception has occurred: CLR/System.ArgumentException
An unhandled exception of type 'System.ArgumentException' occurred in System.Linq.Expressions.dll: 'Expression of type 'System.Object' cannot be used for return type 'System.Collections.Generic.IEnumerable`1[System.Object]''
Exception message:
Exception has occurred: CLR/System.ArgumentException
An unhandled exception of type 'System.ArgumentException' occurred in System.Linq.Expressions.dll: 'Expression of type 'System.Object' cannot be used for return type 'System.Collections.Generic.IEnumerable`1[System.Object]''
Stack trace:
at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters, String paramName)
at System.Linq.Expressions.Expression.Lambda(Type delegateType, Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
at System.Linq.Expressions.Expression.Lambda(Type delegateType, Expression body, IEnumerable`1 parameters)
at System.Linq.Dynamic.Core.DynamicQueryableExtensions.SelectManyInternal(IQueryable source, ParsingConfig config, Type resultType, String selector, Object[] args)
at System.Linq.Dynamic.Core.DynamicQueryableExtensions.SelectMany(IQueryable source, ParsingConfig config, String selector, Object[] args)
at System.Linq.Dynamic.Core.DynamicQueryableExtensions.SelectMany(IQueryable source, String selector, Object[] args)
at Program.<Main>$(String[] args)
1. Description
I want to use
SelectMany
over an object which is deserialized from a JSON but get this error:here is my code snip
2. Exception
3. Fiddle or Project
Fiddle
4. Any further technical details
I found a temporary workaround is combining
Select
and LINQ like this:The text was updated successfully, but these errors were encountered: