mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
update SqlMiddle
This commit is contained in:
parent
0e20065f8b
commit
3c4f620579
@ -199,6 +199,14 @@ namespace OrmTest
|
||||
|
||||
},2,10,ref count,5);
|
||||
var test33= db.Queryable<Order>().ToList();
|
||||
db.CurrentConnectionConfig.SqlMiddle = new SqlMiddle
|
||||
{
|
||||
IsSqlMiddle=true,
|
||||
ExecuteCommand = (s, p)=>{ return s.Length; }
|
||||
|
||||
};
|
||||
var five=db.Ado.ExecuteCommand("11111");
|
||||
db.CurrentConnectionConfig.SqlMiddle = null;
|
||||
Console.WriteLine("#### Examples End ####");
|
||||
}
|
||||
|
||||
|
@ -68,16 +68,16 @@ namespace SqlSugar
|
||||
public SqlMiddle SqlMiddle { get; set; }
|
||||
}
|
||||
public class SqlMiddle
|
||||
{
|
||||
{
|
||||
public bool? IsSqlMiddle { get; set; }
|
||||
public Func<string ,SugarParameter[],object> GetScalar { get; set; }
|
||||
public Func<string, SugarParameter[],int> ExecuteCommand { get; set; }
|
||||
public Func<string, SugarParameter[],IDataReader> GetDataReader { get; set; }
|
||||
public Func<string, SugarParameter[],DataSet> GetDataSetAll { get; set; }
|
||||
public Func<string, SugarParameter[], Task<object>> GetScalarAsync { get; set; }
|
||||
public Func<string, SugarParameter[], Task<int>> ExecuteCommandAsync { get; set; }
|
||||
public Func<string, SugarParameter[], Task<IDataReader>> GetDataReaderAsync { get; set; }
|
||||
public Func<string, SugarParameter[], Task<DataSet>> GetDataSetAllAsync { get; set; }
|
||||
public Func<string, SugarParameter[], object> GetScalar { get; set; } = (s,p) => throw new NotSupportedException("SqlMiddle.GetScalar");
|
||||
public Func<string, SugarParameter[],int> ExecuteCommand { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.ExecuteCommand");
|
||||
public Func<string, SugarParameter[],IDataReader> GetDataReader { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.GetDataReader");
|
||||
public Func<string, SugarParameter[],DataSet> GetDataSetAll { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.GetDataSetAll");
|
||||
public Func<string, SugarParameter[], Task<object>> GetScalarAsync { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.GetScalarAsync");
|
||||
public Func<string, SugarParameter[], Task<int>> ExecuteCommandAsync { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.ExecuteCommandAsync");
|
||||
public Func<string, SugarParameter[], Task<IDataReader>> GetDataReaderAsync { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.GetDataReaderAsync");
|
||||
public Func<string, SugarParameter[], Task<DataSet>> GetDataSetAllAsync { get; set; } = (s, p) => throw new NotSupportedException("SqlMiddle.GetDataSetAllAsync");
|
||||
|
||||
}
|
||||
public class AopEvents
|
||||
|
Loading…
Reference in New Issue
Block a user