Skip to content

Query using Expression is failing for 'Contains()' == 'false' #102

@mikependon

Description

@mikependon

The integration test below is failing at v1.8.4.

[TestMethod]
public void TestSqlConnectionQueryViaExpressionWithArrayContainsAsBooleanFalse()
{
	// Setup
	var tables = CreateSimpleTables(10);
	var values = new[] { "NVARCHAR1", "NVARCHAR2" };

	using (var connection = new SqlConnection(Database.ConnectionStringForRepoDb))
	{
		// Act
		tables.ForEach(item => item.Id = Convert.ToInt32(connection.Insert(item)));

		// Act
		var result = connection.Query<SimpleTable>(c => values.Contains(c.ColumnNVarChar) == false);

		// Assert
		Assert.AreEqual(8, result.Count());
		result.ToList().ForEach(table => AssertPropertiesEquality(tables.First(t => t.Id == table.Id), table));
	}
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdeployedFeature or bug is deployed at the current releasetodoThings to be done in the future

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions