mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add unit test
This commit is contained in:
parent
685b19f3df
commit
8c187165ae
@ -14,6 +14,16 @@ namespace SqlSugarSelect
|
|||||||
[SqlSugar.SugarColumn(ColumnDataType = "ntext", IsJson = true)]
|
[SqlSugar.SugarColumn(ColumnDataType = "ntext", IsJson = true)]
|
||||||
public Guid[] Ids { get; set; }
|
public Guid[] Ids { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ViewTestModel1
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
public string Titlt { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(ColumnDataType = "ntext", IsJson = true,IsIgnore =true)]
|
||||||
|
public Guid[] Ids { get; set; }
|
||||||
|
}
|
||||||
[SqlSugar.SugarTable("UnitTestModel2")]
|
[SqlSugar.SugarTable("UnitTestModel2")]
|
||||||
public class TestModel2
|
public class TestModel2
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugarSelect;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -85,6 +86,12 @@ namespace OrmTest
|
|||||||
{
|
{
|
||||||
throw new Exception("unit test");
|
throw new Exception("unit test");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var list13=db.Queryable<object>().AS("UnitTestModel1").Select<ViewTestModel1>().ToList();
|
||||||
|
if (list13.First().Ids.Count() == 0)
|
||||||
|
{
|
||||||
|
throw new Exception("unit test");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class UnitJsonTestadsga1
|
public class UnitJsonTestadsga1
|
||||||
|
Loading…
Reference in New Issue
Block a user