We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the issue or propose a feature.
public class DataSetA { public string Name { get; set; } public int Id { get; set; } public DateTime Time { get; set; } public int? L { get; set; } } var ds = new DataSetA[0]; var q = ds.AsQueryable() .GroupBy("Time") .Select("new (Select(L).Where(it!=null).Average() as q)");//Error var q1 = ds.GroupBy(x => x.Time) .Select(x => new { q = x.Select(d => d.L).Where(d => d != null).Average() });//Ok
在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseEnumerable(Expression instance, Type elementType, String methodName, Int32 errorPos, Type type) 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseMemberAccess(Type type, Expression expression) 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParsePrimary() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseUnary() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseMultiplicative() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAdditive() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseShiftOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseComparisonOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLogicalAndOrOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIn() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAndOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseOrOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLambdaOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseNullCoalescingOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseConditionalOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseNew() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIdentifier() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParsePrimary() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseUnary() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseMultiplicative() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAdditive() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseShiftOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseComparisonOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLogicalAndOrOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseIn() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseAndOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseOrOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseLambdaOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseNullCoalescingOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.ParseConditionalOperator() 在 System.Linq.Dynamic.Core.Parser.ExpressionParser.Parse(Type resultType, Boolean createParameterCtor) 在 System.Linq.Dynamic.Core.DynamicExpressionParser.ParseLambda(Type delegateType, ParsingConfig parsingConfig, Boolean createParameterCtor, ParameterExpression[] parameters, Type resultType, String expression, Object[] values) 在 System.Linq.Dynamic.Core.DynamicQueryableExtensions.Select(IQueryable source, ParsingConfig config, String selector, Object[] args)
The text was updated successfully, but these errors were encountered:
Select->Where->Average
GroupBy->Select->Where->Average
var q = ds.AsQueryable() .GroupBy("Time") .Select("new (Where(L!=null).Any()? (Sum(L)/Where(L!=null).Count()):null as q)") .ToDynamicList();//OK var q1 = ds.GroupBy(x => x.Time) .Select(x => new { q = x.Select(d => d.L).Where(d => d != null).Average() }) .ToDynamicList();//OK
I must use that replace origin.
Sorry, something went wrong.
@Cricle Is this still an issue, or did you solve it yourself?
It still an issue.
GroupBy Select Where Average
StefH
No branches or pull requests
1. Description
Describe the issue or propose a feature.
2. Exception
3. Fiddle or Project
4. Any further technical details
The text was updated successfully, but these errors were encountered: