mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add unit test bug
This commit is contained in:
parent
7765690ff7
commit
bf76982811
@ -77,6 +77,7 @@
|
||||
<Compile Include="Models\TestTree.cs" />
|
||||
<Compile Include="Models\Tree.cs" />
|
||||
<Compile Include="Models\ViewOrder.cs" />
|
||||
<Compile Include="UnitTest\UnitFilterdafa.cs" />
|
||||
<Compile Include="UnitTest\Models\BilPayment.cs" />
|
||||
<Compile Include="UnitTest\UInsert3.cs" />
|
||||
<Compile Include="UnitTest\Unit01.cs" />
|
||||
|
@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
UnitFilterdafa.Init();
|
||||
UInsert3.Init();
|
||||
USaveable.Init();
|
||||
UnitSubToList.Init();
|
||||
|
38
Src/Asp.Net/SqliteTest/UnitTest/UnitFilterdafa.cs
Normal file
38
Src/Asp.Net/SqliteTest/UnitTest/UnitFilterdafa.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public class UnitFilterdafa
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
var db = NewUnitTest.Db;
|
||||
db.CodeFirst.InitTables<UintLeft0123, UintRight0123>();
|
||||
db.QueryFilter.AddTableFilter<IDEL>(it => it.IsDeleted == false);
|
||||
db.Queryable<UintLeft0123>().LeftJoin<UintRight0123>((x, y) => x.Id == y.Id)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
}
|
||||
public class UintLeft0123 : IDEL
|
||||
{
|
||||
public string Id { get; set; }
|
||||
[SqlSugar.SugarColumn(ColumnName = "Is_Deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
public class UintRight0123: IDEL
|
||||
{
|
||||
public string Id { get; set; }
|
||||
[SqlSugar.SugarColumn(ColumnName = "Is_Deleted")]
|
||||
public bool IsDeleted { get; set; }
|
||||
}
|
||||
|
||||
public interface IDEL
|
||||
{
|
||||
bool IsDeleted { get; set; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user