Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-61

Primitive scalar queries fail with exception

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • Public Preview 1
    • Affects Version/s: None
    • None

      We have regressed on primitive scalar queries at some point during development - we were expecting coverage from the EF suite so didn't have any.

      This affects count, longcount, sum, etc. with and without predicates.

      Expression of type 'MongoDB.EntityFrameworkCore.FunctionalTests.Entities.Guides.Planet' cannot be used for return type 'System.Int32'
         at System.Linq.Expressions.Expression.ValidateLambdaArgs(Type delegateType, Expression& body, ReadOnlyCollection`1 parameters, String paramName)
         at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, String name, Boolean tailCall, IEnumerable`1 parameters)
         at System.Linq.Expressions.Expression.Lambda[TDelegate](Expression body, Boolean tailCall, IEnumerable`1 parameters)
         at MongoDB.EntityFrameworkCore.Query.MongoQueryCompilationContext.CreateQueryExecutor[TResult](Expression query) in E:\src\mongoef4\src\MongoDB.EntityFrameworkCore\Query\MongoQueryCompilationContext.cs:line 49

            Assignee:
            damien.guard@mongodb.com Damien Guard
            Reporter:
            damien.guard@mongodb.com Damien Guard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: