mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 解决 vb.net 表达式无法解析字符串比较;#140
This commit is contained in:
26
Examples/test_vb/Program.vb
Normal file
26
Examples/test_vb/Program.vb
Normal file
@ -0,0 +1,26 @@
|
||||
Imports System
|
||||
|
||||
Module Program
|
||||
Sub Main(args As String())
|
||||
Console.WriteLine("Hello World!")
|
||||
|
||||
Dim fsql = New FreeSql.FreeSqlBuilder() _
|
||||
.UseConnectionString(FreeSql.DataType.Sqlite, "data source=testvb.db") _
|
||||
.UseAutoSyncStructure(True) _
|
||||
.UseMonitorCommand(Sub(cmd) Trace.WriteLine(cmd.CommandText)) _
|
||||
.Build()
|
||||
|
||||
REM Microsoft.VisualBasic.CompilerServices.Operators.CompareString()
|
||||
Dim List1 = fsql.Select(Of Testvb).Where(Function(a) a.Id = 100).ToList()
|
||||
Dim List2 = fsql.Select(Of Testvb).Where(Function(a) a.Title = "xxx").ToList()
|
||||
Dim List3 = fsql.Select(Of Testvb).Where(Function(a) a.Title <> "xxx").ToList()
|
||||
|
||||
fsql.Dispose()
|
||||
End Sub
|
||||
End Module
|
||||
|
||||
Class Testvb
|
||||
Property Id As Integer
|
||||
Property Title As String
|
||||
End Class
|
||||
|
13
Examples/test_vb/test_vb.vbproj
Normal file
13
Examples/test_vb/test_vb.vbproj
Normal file
@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>test_vb</RootNamespace>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Providers\FreeSql.Provider.Sqlite\FreeSql.Provider.Sqlite.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Reference in New Issue
Block a user