Add user case test

This commit is contained in:
sunkaixuan 2023-12-15 19:07:54 +08:00
parent 456526e212
commit 8de99fa14a
3 changed files with 27 additions and 0 deletions

View File

@ -80,6 +80,7 @@
<Compile Include="Models\ViewOrder.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTest\Unitadfafayyy.cs" />
<Compile Include="UnitTest\UInsert3.cs" />
<Compile Include="UnitTest\Unit001.cs" />
<Compile Include="UnitTest\UnitStorageableBool.cs" />

View File

@ -34,6 +34,7 @@ namespace OrmTest
}
public static void Init()
{
Unitadfafayyy.Init();
UInsert3.Init();
Unit001.Init();
UnitStorageableBool.Init();

View File

@ -0,0 +1,25 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OrmTest
{
internal class Unitadfafayyy
{
public static void Init()
{
var db = NewUnitTest.Db;
db.CodeFirst.InitTables<Unitadfzadsfa>();
db.Insertable(new Unitadfzadsfa() { time = TimeSpan.FromDays(1) }).ExecuteCommand();
var list=db.Queryable<Unitadfzadsfa>().ToList();
}
public class Unitadfzadsfa
{
[SqlSugar.SugarColumn(ColumnDataType = "interval day to second")]
public TimeSpan time { get; set; }
}
}
}