As reported by the user, a NullReferenceException is thrown if the Query Expression is equate to a NULL values.
connection.Query<Person>(e => e.Name == null);
It has happened on the latest compiler, in which such basic scenario is apparently not covered by the Integration Tests. We have added the below's Integration Test.
[TestMethod]
public void TestSqlConnectionQueryAsyncViaExpressionWithNullValue()
{
// Setup
var tables = Helper.CreateIdentityTables(10);
var last = tables.Last();
using (var connection = new SqlConnection(Database.ConnectionStringForRepoDb))
{
// Act
connection.InsertAll(tables);
// Act
var result = connection.QueryAsync<IdentityTable>(c => c.ColumnNVarChar == null).Result;
// Assert
Assert.AreEqual(0, result.Count());
}
}
As reported by the user, a NullReferenceException is thrown if the Query Expression is equate to a NULL values.
It has happened on the latest compiler, in which such basic scenario is apparently not covered by the Integration Tests. We have added the below's Integration Test.