Skip to content

NotEqual filter not working with DateTime #19

@Muchiachio

Description

@Muchiachio
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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions