dbelmont/ExpressionBuilder

PropertyValueTypeMismatchException

ChinhDuong opened this issue · 5 comments

I got PropertyValueTypeMismatchException when running following. I use .net 4.5.2. Could anyone help me to resolve it? Thanks in advance
class Person{
public long? Id { get; set; };
}

List people = new List<Person>{
new Person { Id = 1 },
new Person { Id = null },
new Person { Id = 2 },
}
var filter = new Filter<Person>();
long?[] idList = new long? { 1 };
filter.By("Id", Operation.In, idList);
var result = people.Where(filter); // throw PropertyValueTypeMismatchException

Hi @ChinhDuong,
Many thanks for using the project. And thanks for finding a bug! 🎉
I'll fix that and get back to you once it's done.
Cheers.

Hi @ChinhDuong,

I created a pre-release package at NuGet.org with the fix for this issue.
Would you mind checking that out and leaving a comment here to let me know if it's working correctly now?

Many thanks,
David

I tested the bug on 2.0.2-beta. it is not fixed

Hi @ChinhDuong,

Good news! I believe I got it right this time (even created a couple of tests specifically for that).

I just published a new version yesterday. Would you mind having a look at that?

Many thanks,
David