Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotEqual filter not working with DateTime #19

Closed
Muchiachio opened this issue May 20, 2016 · 2 comments
Closed

NotEqual filter not working with DateTime #19

Muchiachio opened this issue May 20, 2016 · 2 comments
Assignees
Labels

Comments

@Muchiachio
Copy link

Muchiachio commented May 20, 2016

public class Program
{
    public static void Main(string[] args)
    {
        IQueryable<Model> models = new[] { new Model() }.AsQueryable();

        Console.WriteLine(models.Where("Date != null").ToArray().Length);
    }
}

public class Model
{
    public DateTime Date { get; set; }
}

Throws The binary operator NotEqual is not defined for the types 'System.DateTime' and 'System.String'. This works in System.Linq.Dynamic and System.Linq.

@StefH StefH self-assigned this May 20, 2016
@StefH StefH added the bug label May 20, 2016
@StefH
Copy link
Collaborator

StefH commented May 20, 2016

Issue is solved, some unit-tests are also added.

Can you please verify this library ? Or do you want a NuGet to test ?

@Muchiachio
Copy link
Author

Muchiachio commented May 21, 2016

I confirmed in a library, it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants