mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-26 02:39:14 +08:00
Add Queryable.Having overload method
This commit is contained in:
@@ -81,6 +81,7 @@
|
||||
<Compile Include="UnitTest\UInsert.cs" />
|
||||
<Compile Include="UnitTest\UQueryable2.cs" />
|
||||
<Compile Include="UnitTest\UQueue.cs" />
|
||||
<Compile Include="UnitTest\UTran.cs" />
|
||||
<Compile Include="_OldTest\BugTest\Bug2.cs" />
|
||||
<Compile Include="_OldTest\BugTest\Bug5.cs" />
|
||||
<Compile Include="_OldTest\BugTest\Bug4.cs" />
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace OrmTest
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
Tran();
|
||||
Insert();
|
||||
Queue();
|
||||
CodeFirst();
|
||||
|
||||
34
Src/Asp.Net/SqlServerTest/UnitTest/UTran.cs
Normal file
34
Src/Asp.Net/SqlServerTest/UnitTest/UTran.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
public partial class NewUnitTest
|
||||
{
|
||||
|
||||
public static void Tran()
|
||||
{
|
||||
var db = Db;
|
||||
int oldCount = GetCount(db);
|
||||
Console.WriteLine(oldCount);
|
||||
db.BeginTran();
|
||||
db.Deleteable<Order>().ExecuteCommand();
|
||||
Console.WriteLine(GetCount(db));
|
||||
db.RollbackTran();
|
||||
int newCount = GetCount(db);
|
||||
Console.WriteLine(newCount);
|
||||
if (newCount != oldCount)
|
||||
{
|
||||
throw new Exception("NewUnitTest Tran ");
|
||||
}
|
||||
}
|
||||
|
||||
private static int GetCount(SqlSugar.SqlSugarClient db)
|
||||
{
|
||||
return db.Queryable<Order>().Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user