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

InvalidOperationException when use parameter set to null

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • GA 1
    • None
    • None

    Description

      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'.

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty