Closed srlopez closed 5 years ago
computers.delete(fun c -> c.Id < 4)
Is this a bug? @Zaid-Ajaj
I test it locally
computers.Delete(fun i -> i.Id < 4) take effect. While computers.delete(fun c -> c.Id < 4) doesn't do anything
The same to computers.findMany (fun c -> c.Id>0) (yield nothing) computers.Find (fun c -> c.Id>0) (yield actual results)
Indeed this doesn't work in with identity fields because I don't expect to query a range of elements using their ID, it doesn't make sense unless you want an exact element by it's ID which is why:
When I use the value Id in a function on the extensions, I don't get any results, nor do I get any error. On the other hand with other values everything seems to work correctly.
computers.delete(fun c -> c.Id < 4)
orcomputers.findMany (fun c -> c.Id>3) |> Seq.iter (printfn "%A")
do not execute anything, do not send error messages. But if I use any other property it works.computers.findMany (fun c -> c.CPU = Intel) |> Seq.iter (printfn "%A")
orcomputers.delete(fun c -> c.Manufacturer.Contains "m")
does the work.Event worse width id in a expression:
computers.delete(fun c -> c.Id < myPc.Id-4)