mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-16 04:59:34 +08:00
Code optimization
This commit is contained in:
parent
6e9593bb52
commit
eca729e877
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Reflection;
|
||||
using System.Dynamic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
public partial class QueryableProvider<T> : QueryableAccessory, ISugarQueryable<T>
|
||||
{
|
||||
public SqlSugarProvider Context { get; set; }
|
||||
public IAdo Db { get { return Context.Ado; } }
|
||||
public IDbBind Bind { get { return this.Db.DbBind; } }
|
||||
public ISqlBuilder SqlBuilder { get; set; }
|
||||
public MappingTableList OldMappingTableList { get; set; }
|
||||
public MappingTableList QueryableMappingTableList { get; set; }
|
||||
public List<Action<T>> MapperAction { get; set; }
|
||||
public Action<T, MapperCache<T>> MapperActionWithCache { get; set; }
|
||||
public List<Action<List<T>>> Mappers { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public int CacheTime { get; set; }
|
||||
public string CacheKey { get; set; }
|
||||
public bool IsAs { get; set; }
|
||||
public QueryBuilder QueryBuilder
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.SqlBuilder.QueryBuilder;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SqlBuilder.QueryBuilder = value;
|
||||
}
|
||||
}
|
||||
public EntityInfo EntityInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -15,42 +15,7 @@ namespace SqlSugar
|
||||
#region T1
|
||||
public partial class QueryableProvider<T> : QueryableAccessory, ISugarQueryable<T>
|
||||
{
|
||||
public SqlSugarProvider Context { get; set; }
|
||||
public IAdo Db { get { return Context.Ado; } }
|
||||
public IDbBind Bind { get { return this.Db.DbBind; } }
|
||||
public ISqlBuilder SqlBuilder { get; set; }
|
||||
public MappingTableList OldMappingTableList { get; set; }
|
||||
public MappingTableList QueryableMappingTableList { get; set; }
|
||||
public List<Action<T>> MapperAction { get; set; }
|
||||
public Action<T, MapperCache<T>> MapperActionWithCache { get; set; }
|
||||
public List<Action<List<T>>> Mappers { get; set; }
|
||||
public bool IsCache { get; set; }
|
||||
public int CacheTime { get; set; }
|
||||
public string CacheKey { get; set; }
|
||||
public bool IsAs { get; set; }
|
||||
public QueryBuilder QueryBuilder
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.SqlBuilder.QueryBuilder;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.SqlBuilder.QueryBuilder = value;
|
||||
}
|
||||
}
|
||||
public EntityInfo EntityInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.Context.EntityMaintenance.GetEntityInfo<T>();
|
||||
}
|
||||
}
|
||||
//public ISugarQueryable<T> CrossQueryWithAttr()
|
||||
//{
|
||||
// this.QueryBuilder.IsCrossQueryWithAttr = true;
|
||||
// return this;
|
||||
//}
|
||||
|
||||
public ISugarQueryable<T> CrossQuery<Type>(string configId)
|
||||
{
|
||||
return this.CrossQuery(typeof(Type),configId);
|
||||
|
@ -114,6 +114,7 @@
|
||||
<Compile Include="Abstract\FastestProvider\SplitFastest.cs" />
|
||||
<Compile Include="Abstract\FilterProvider\FilterProvider.cs" />
|
||||
<Compile Include="Abstract\InsertableProvider\InsertableHelper.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableProperties.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableProvider11-12.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableProvider06-10.cs" />
|
||||
<Compile Include="Abstract\QueryableProvider\QueryableHelper.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user