[EF-69] InvalidOperationException when use parameter set to null Created: 02/Nov/23  Updated: 07/Nov/23  Resolved: 07/Nov/23

Status: Closed
Project: Entity Framework
Component/s: None
Affects Version/s: None
Fix Version/s: GA 1

Type: Bug Priority: Unknown
Reporter: Oleksandr Poliakov Assignee: Oleksandr Poliakov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


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

 


Generated at Thu Feb 08 08:26:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.