mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-12-21 19:09:57 +08:00
Add unit test
This commit is contained in:
@@ -109,6 +109,7 @@
|
|||||||
<Compile Include="UnitTest\Models\SysFormField.cs" />
|
<Compile Include="UnitTest\Models\SysFormField.cs" />
|
||||||
<Compile Include="UnitTest\Models\SysFormFieldInput.cs" />
|
<Compile Include="UnitTest\Models\SysFormFieldInput.cs" />
|
||||||
<Compile Include="UnitTest\Models\SysFormUpload.cs" />
|
<Compile Include="UnitTest\Models\SysFormUpload.cs" />
|
||||||
|
<Compile Include="UnitTest\UnitTime.cs" />
|
||||||
<Compile Include="UnitTest\UnitUpdateNavOneToOne.cs" />
|
<Compile Include="UnitTest\UnitUpdateNavOneToOne.cs" />
|
||||||
<Compile Include="UnitTest\CrossDatabase01.cs" />
|
<Compile Include="UnitTest\CrossDatabase01.cs" />
|
||||||
<Compile Include="UnitTest\CrossDatabase02.cs" />
|
<Compile Include="UnitTest\CrossDatabase02.cs" />
|
||||||
|
|||||||
26
Src/Asp.Net/SqlServerTest/UnitTest/UnitTime.cs
Normal file
26
Src/Asp.Net/SqlServerTest/UnitTest/UnitTime.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public class UnitTime
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = NewUnitTest.Db;
|
||||||
|
var xx=db.Queryable<Test>().Where(it => (it.a == DateTime.Now && it.a == DateTime.Now) || (it.a == DateTime.Now && it.a == DateTime.Now)).ToSql();
|
||||||
|
foreach (var item in xx.Value)
|
||||||
|
{
|
||||||
|
Console.WriteLine(item.DbType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class Test
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(SqlParameterDbType =System.Data.DbType.Date)]
|
||||||
|
public DateTime a { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user