testCase'
"filter IsOneOf" <|
fun (db,store) ->
let expectedDog = saveDog' store
let names = [|expectedDog.Name; "Fido"; "Snape"|]
use session = store.OpenSession()
let actualDog =
session
|> Session.query<Dog>
|> Queryable.filter <@fun d -> d.Name.IsOneOf(names) @>
|> Queryable.head
Expect.equal expectedDog actualDog "Should be one dog!"
Unable to cast object of type 'System.Linq.Expressions.PropertyExpression' to type 'System.Linq.Expressions.LambdaExpression'.
at Marten.Lambda.translateExpr(Expression linq) in Marten.FSharp/src/Marten.FSharp/Marten.FSharp.fs:line 47
at Marten.Lambda.translateExpr(Expression linq) in Marten.FSharp/src/Marten.FSharp/Marten.FSharp.fs:line 47
at Marten.Queryable.filter[a](FSharpExpr`1 f, IQueryable`1 q) in Marten.FSharp/src/Marten.FSharp/Marten.FSharp.fs:line 227
at [email protected](Tuple`2 tupledArg) in Marten.FSharp/tests/Marten.FSharp.Tests/Tests.fs:line 277
at Tests.API [email protected](Tuple`2 x) in Marten.FSharp/tests/Marten.FSharp.Tests/Tests.fs:line 824
at [email protected](AsyncParams`1 args)