System.ArgumentException: Expression of type 'System.Collections.Generic.IEnumerable`1[MyApp.Common.Models.StateInfo]'
|
cannot be used for parameter of type 'System.Linq.IQueryable`1[MyApp.Common.Models.StateInfo]' of method
|
'Int32 Count[StateInfo](System.Linq.IQueryable`1[MyApp.Common.Models.StateInfo])' (Parameter 'arg0')
|
at System.Dynamic.Utils.ExpressionUtils.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arguments, ParameterInfo pi, String methodParamName, String argumentParamName, Int32 index)
|
at System.Linq.Expressions.Expression.Call(MethodInfo method, Expression arg0)
|
at System.Linq.Expressions.MethodCallExpression1.Rewrite(Expression instance, IReadOnlyList`1 args)
|
at System.Linq.Expressions.ExpressionVisitor.VisitMethodCall(MethodCallExpression node)
|
at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor)
|
at MongoDB.Driver.Linq.Processors.Transformer.Visit(Expression node)
|
at MongoDB.Driver.Linq.Processors.Transformer.Transform(Expression node)
|
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Prepare(Expression expression)
|
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Translate(Expression expression)
|
at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken)
|
at MongoDB.Driver.Linq.MongoQueryable.CountAsync[TSource](IMongoQueryable`1 source, CancellationToken cancellationToken)
|