mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add Queryable.Having overload method
This commit is contained in:
parent
c05677740c
commit
b244eb6bd1
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
@ -3387,6 +3387,41 @@ namespace SqlSugar
|
||||
_GroupBy(expression);
|
||||
return this;
|
||||
}
|
||||
public new ISugarQueryable<T, T2, T3, T4, T5> Having(Expression<Func<T, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5> Having(Expression<Func<T, T2, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5> Having(Expression<Func<T, T2, T3, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5> Having(Expression<Func<T, T2, T3, T4, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4,T5> Having(Expression<Func<T, T2, T3, T4, T5, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public new ISugarQueryable<T, T2, T3, T4,T5> Having(string whereString, object whereObj)
|
||||
{
|
||||
base.Having(whereString, whereObj);
|
||||
return this;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Aggr
|
||||
@ -3774,6 +3809,46 @@ namespace SqlSugar
|
||||
_GroupBy(expression);
|
||||
return this;
|
||||
}
|
||||
public new ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, T5, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
public ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, T5,T6, bool>> expression)
|
||||
{
|
||||
this._Having(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
public new ISugarQueryable<T, T2, T3, T4, T5,T6> Having(string whereString, object whereObj)
|
||||
{
|
||||
base.Having(whereString, whereObj);
|
||||
return this;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Aggr
|
||||
|
@ -496,6 +496,12 @@ namespace SqlSugar
|
||||
ISugarQueryable<T, T2, T3, T4, T5> GroupBy(Expression<Func<T, T2, T3, object>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5> GroupBy(Expression<Func<T, T2, T3, T4, object>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5> GroupBy(Expression<Func<T, T2, T3, T4, T5, object>> expression);
|
||||
new ISugarQueryable<T, T2, T3, T4,T5> Having(Expression<Func<T, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4,T5> Having(Expression<Func<T, T2, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4,T5> Having(Expression<Func<T, T2, T3, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4,T5> Having(Expression<Func<T, T2, T3, T4, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5> Having(Expression<Func<T, T2, T3, T4,T5, bool>> expression);
|
||||
new ISugarQueryable<T, T2, T3, T4,T5> Having(string whereString, object parameters = null);
|
||||
#endregion
|
||||
|
||||
#region Aggr
|
||||
@ -594,6 +600,13 @@ namespace SqlSugar
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> GroupBy(Expression<Func<T, T2, T3, T4, object>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> GroupBy(Expression<Func<T, T2, T3, T4, T5, object>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> GroupBy(Expression<Func<T, T2, T3, T4, T5, T6, object>> expression);
|
||||
new ISugarQueryable<T, T2, T3, T4, T5,T6> Having(Expression<Func<T, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, T5, bool>> expression);
|
||||
ISugarQueryable<T, T2, T3, T4, T5, T6> Having(Expression<Func<T, T2, T3, T4, T5,T6, bool>> expression);
|
||||
new ISugarQueryable<T, T2, T3, T4, T5, T6> Having(string whereString, object parameters = null);
|
||||
#endregion
|
||||
|
||||
#region Aggr
|
||||
|
Loading…
Reference in New Issue
Block a user