Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-69

InvalidOperationException when use parameter set to null

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.0.0
    • Affects Version/s: None
    • None

      Try to use any condition in Where clause with parameter set to null:

      string prm = null;
      var results = _db.Planets.Where(p => p.name == prm).ToArray();

      the following exception raised:

      System.InvalidOperationException: The operands for operator 'Equal' do not match the parameters of method 'op_Equality'.

       

            Assignee:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Reporter:
            oleksandr.poliakov@mongodb.com Oleksandr Poliakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: