InvalidOperationException when use parameter set to null

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 8.0.0
    • Affects Version/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Oleksandr Poliakov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: