mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
- 兼容 Vb.Net 无法使用 int? 类型 = 等号表达式解析;#140
This commit is contained in:
parent
1b1f5c12ae
commit
4330148193
@ -10,6 +10,10 @@ Namespace FreeSql.Tests.VB
|
||||
Dim id As Integer = 100
|
||||
Dim List1 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Id = 100).ToList()
|
||||
Dim List2 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Id = id).ToList()
|
||||
Dim List11 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.IdNullable = 100).ToList()
|
||||
Dim List22 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.IdNullable = id).ToList()
|
||||
Dim idNullable As Integer? = 100
|
||||
Dim List222 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.IdNullable = idNullable).ToList()
|
||||
Dim List3 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Title = "xxx").ToList()
|
||||
Dim title As String = "xxx"
|
||||
Dim List4 = g.sqlserver.Select(Of Testvb).Where(Function(a) a.Title = title).ToList()
|
||||
@ -43,6 +47,7 @@ Class Testvb
|
||||
Property Id As Integer
|
||||
Property Title As String
|
||||
Property IsDeleted As Boolean
|
||||
Property IdNullable As Integer?
|
||||
|
||||
Property Testvb2s As List(Of Testvb2)
|
||||
End Class
|
||||
|
@ -559,6 +559,7 @@ namespace FreeSql.Internal
|
||||
case ExpressionType.Lambda: return ExpressionLambdaToSql((exp as LambdaExpression)?.Body, tsc);
|
||||
case ExpressionType.TypeAs:
|
||||
case ExpressionType.Convert:
|
||||
case ExpressionType.ConvertChecked:
|
||||
//var othercExp = ExpressionLambdaToSqlOther(exp, tsc);
|
||||
//if (string.IsNullOrEmpty(othercExp) == false) return othercExp;
|
||||
return ExpressionLambdaToSql((exp as UnaryExpression)?.Operand, tsc);
|
||||
|
Loading…
x
Reference in New Issue
Block a user