mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 21:53:35 +08:00
Add unit test
This commit is contained in:
parent
a89bb5fb5b
commit
da2fb762cf
@ -1,4 +1,6 @@
|
|||||||
using System;
|
using Newtonsoft.Json.Converters;
|
||||||
|
using SqlSugar.DbConvert;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -36,6 +38,24 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
Db.Updateable<Unit00Z11C12>(x3).WhereColumns(it=>it.type).ExecuteCommand();
|
Db.Updateable<Unit00Z11C12>(x3).WhereColumns(it=>it.type).ExecuteCommand();
|
||||||
var x4 = Db.Queryable<Unit00Z11C12>().ToList();
|
var x4 = Db.Queryable<Unit00Z11C12>().ToList();
|
||||||
|
var db = NewUnitTest.Db;
|
||||||
|
db.CodeFirst.InitTables<Unit00Z11C1yyafa>();
|
||||||
|
var type = UnitType.a;
|
||||||
|
xxx.unitType = type;
|
||||||
|
var list=db.Queryable<Unit00Z11C1yyafa>()
|
||||||
|
.Where(it=>it.type==xxx.unitType)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
public class xxx
|
||||||
|
{
|
||||||
|
public static UnitType unitType { get; set; }
|
||||||
|
}
|
||||||
|
public class Unit00Z11C1yyafa
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(ColumnDataType = "varchar(20)",SqlParameterDbType =typeof(EnumToStringConvert), IsNullable = false)]
|
||||||
|
public UnitType type { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(ColumnDataType = "varchar(20)", SqlParameterDbType = typeof(EnumToStringConvert), IsNullable = true)]
|
||||||
|
public UnitType? type2 { get; set; }
|
||||||
}
|
}
|
||||||
public class Unit00Z11C12
|
public class Unit00Z11C12
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user