- 修复 preview0808 表达式解析 null 异常

This commit is contained in:
28810
2020-08-10 00:41:11 +08:00
parent e49f8b56fc
commit 4bf81111f0
2 changed files with 13 additions and 2 deletions

View File

@ -4,6 +4,17 @@ Imports Xunit
Namespace FreeSql.Tests.VB
Public Class UnitTest1
<Fact>
Sub IsNothing()
Dim sql = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Id = 100 AndAlso a.Title Is Nothing).ToSql()
Assert.Equal("SELECT a.[Id], a.[Title], a.[IsDeleted], a.[IdNullable]
FROM [Testvb] a
WHERE (a.[Id] = 100 AND a.[Title] IS NULL)", sql)
Dim lst = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Id = 100 AndAlso a.Title Is Nothing).ToList()
End Sub
<Fact>
Sub TestSub()