Browse Source

Beautification code

pull/12/MERGE
sunkaixuan 6 years ago
parent
commit
56d93ff436
  1. 2
      Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
  2. 4
      Src/Asp.Net/SqlSugar/Abstract/AopProvider/AopProvider.cs
  3. 2
      Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs
  4. 2
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs
  5. 2
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs
  6. 6
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs
  7. 2
      Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs
  8. 2
      Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Properties.cs
  9. 2
      Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs
  10. 2
      Src/Asp.Net/SqlSugar/Abstract/FilterProvider/FilterProvider.cs
  11. 2
      Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs
  12. 2
      Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs
  13. 6
      Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs
  14. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/DeleteBuilder.cs
  15. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs
  16. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs
  17. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs
  18. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlQueryBuilder.cs
  19. 2
      Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs
  20. 2
      Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs
  21. 2
      Src/Asp.Net/SqlSugar/Entities/ModelContext.cs
  22. 6
      Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs
  23. 4
      Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarEngine.cs
  24. 2
      Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarEngine_Part2.cs
  25. 2
      Src/Asp.Net/SqlSugar/Interface/IAdo.cs
  26. 2
      Src/Asp.Net/SqlSugar/Interface/ICodeFirst.cs
  27. 4
      Src/Asp.Net/SqlSugar/Interface/IContextMethods.cs
  28. 2
      Src/Asp.Net/SqlSugar/Interface/IDMLBuilder.cs
  29. 2
      Src/Asp.Net/SqlSugar/Interface/IDbBind.cs
  30. 2
      Src/Asp.Net/SqlSugar/Interface/IDbMaintenance.cs
  31. 2
      Src/Asp.Net/SqlSugar/Interface/ILambdaExpressions.cs
  32. 2
      Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs
  33. 2
      Src/Asp.Net/SqlSugar/OnlyNet/PostgreSQLExpressionContext.cs
  34. 2
      Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs
  35. 2
      Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleExpressionContext.cs
  36. 2
      Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerExpressionContext.cs
  37. 2
      Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteExpressionContext.cs
  38. 4
      Src/Asp.Net/SqlSugar/SqlSugar.csproj
  39. 2
      Src/Asp.Net/SqlSugar/SqlSugarClient.cs
  40. 2
      Src/Asp.Net/SqlSugar/Utilities/UtilConstants.cs
  41. 8
      Src/Asp.Net/SqlSugar/Utilities/UtilExceptions.cs

2
Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs

@ -34,7 +34,7 @@ namespace SqlSugar
protected List<IDataParameter> OutputParameters { get; set; }
public virtual string SqlParameterKeyWord { get { return "@"; } }
public IDbTransaction Transaction { get; set; }
public virtual SqlSugarContext Context { get; set; }
public virtual SqlSugarEngine Context { get; set; }
internal CommandType OldCommandType { get; set; }
internal bool OldClearParameters { get; set; }
public IDataParameterCollection DataReaderParameters { get; set; }

4
Src/Asp.Net/SqlSugar/Abstract/AopProvider/AopProvider.cs

@ -8,12 +8,12 @@ namespace SqlSugar
public class AopProvider
{
private AopProvider() { }
public AopProvider(SqlSugarContext context)
public AopProvider(SqlSugarEngine context)
{
this.Context = context;
this.Context.Ado.IsEnableLogEvent = true;
}
private SqlSugarContext Context { get; set; }
private SqlSugarEngine Context { get; set; }
public Action<DiffLogModel> OnDiffLogEvent { set { this.Context.CurrentConnectionConfig.AopEvents.OnDiffLogEvent = value; } }
public Action<SqlSugarException> OnError { set { this.Context.CurrentConnectionConfig.AopEvents.OnError = value; } }
public Action<string, SugarParameter[]> OnLogExecuting { set { this.Context.CurrentConnectionConfig.AopEvents.OnLogExecuting= value; } }

2
Src/Asp.Net/SqlSugar/Abstract/CodeFirstProvider/CodeFirstProvider.cs

@ -8,7 +8,7 @@ namespace SqlSugar
public partial class CodeFirstProvider : ICodeFirst
{
#region Properties
public virtual SqlSugarContext Context { get; set; }
public virtual SqlSugarEngine Context { get; set; }
protected bool IsBackupTable { get; set; }
protected int MaxBackupDataRows { get; set; }
protected virtual int DefultLength { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindAccessory.cs

@ -7,7 +7,7 @@ namespace SqlSugar
{
public partial class DbBindAccessory
{
protected List<T> GetEntityList<T>(SqlSugarContext context, IDataReader dataReader)
protected List<T> GetEntityList<T>(SqlSugarEngine context, IDataReader dataReader)
{
Type type = typeof(T);
var fieldNames = GetDataReaderNames(dataReader);

2
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/DbBindProvider.cs

@ -10,7 +10,7 @@ namespace SqlSugar
public abstract partial class DbBindProvider : DbBindAccessory, IDbBind
{
#region Properties
public virtual SqlSugarContext Context { get; set; }
public virtual SqlSugarEngine Context { get; set; }
public abstract List<KeyValuePair<string, CSharpDataType>> MappingTypes { get; }
#endregion

6
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs

@ -22,7 +22,7 @@ namespace SqlSugar
#endregion
#region Fields
private SqlSugarContext Context = null;
private SqlSugarEngine Context = null;
private IDataReaderEntityBuilder<T> DynamicBuilder;
private IDataRecord DataRecord;
private static readonly MethodInfo isDBNullMethod = typeof(IDataRecord).GetMethod("IsDBNull", new Type[] { typeof(int) });
@ -65,7 +65,7 @@ namespace SqlSugar
private static readonly MethodInfo getOther = typeof(IDataRecordExtensions).GetMethod("GetOther");
private static readonly MethodInfo getSqliteTypeNull = typeof(IDataRecordExtensions).GetMethod("GetSqliteTypeNull");
private static readonly MethodInfo getSqliteType = typeof(IDataRecordExtensions).GetMethod("GetSqliteType");
private static readonly MethodInfo getEntity = typeof(IDataRecordExtensions).GetMethod("GetEntity", new Type[] { typeof(SqlSugarContext) });
private static readonly MethodInfo getEntity = typeof(IDataRecordExtensions).GetMethod("GetEntity", new Type[] { typeof(SqlSugarEngine) });
private delegate T Load(IDataRecord dataRecord);
private Load handler;
@ -77,7 +77,7 @@ namespace SqlSugar
}
public IDataReaderEntityBuilder(SqlSugarContext context, IDataRecord dataRecord,List<string> fieldNames)
public IDataReaderEntityBuilder(SqlSugarEngine context, IDataRecord dataRecord,List<string> fieldNames)
{
this.Context = context;
this.DataRecord = dataRecord;

2
Src/Asp.Net/SqlSugar/Abstract/DbBindProvider/IDataRecordExtensions.cs

@ -243,7 +243,7 @@ namespace SqlSugar
return t;
}
public static object GetEntity(this IDataReader dr, SqlSugarContext context)
public static object GetEntity(this IDataReader dr, SqlSugarEngine context)
{
return null;
}

2
Src/Asp.Net/SqlSugar/Abstract/DbMaintenanceProvider/Properties.cs

@ -9,7 +9,7 @@ namespace SqlSugar
{
#region Context
private ISqlBuilder _SqlBuilder;
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ISqlBuilder SqlBuilder
{
get

2
Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs

@ -9,7 +9,7 @@ namespace SqlSugar
{
public class EntityMaintenance
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public EntityInfo GetEntityInfo<T>()
{

2
Src/Asp.Net/SqlSugar/Abstract/FilterProvider/FilterProvider.cs

@ -7,7 +7,7 @@ namespace SqlSugar
{
public class QueryFilterProvider : IFilter
{
internal SqlSugarContext Context { get; set; }
internal SqlSugarEngine Context { get; set; }
private List<SqlFilterItem> _Filters { get; set; }
public IFilter Add(SqlFilterItem filter)

2
Src/Asp.Net/SqlSugar/Abstract/InsertableProvider/InsertableProvider.cs

@ -10,7 +10,7 @@ namespace SqlSugar
{
public class InsertableProvider<T> : IInsertable<T> where T : class, new()
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public IAdo Ado { get { return Context.Ado; } }
public ISqlBuilder SqlBuilder { get; set; }
public InsertBuilder InsertBuilder { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs

@ -1597,7 +1597,7 @@ namespace SqlSugar
foreach (var item in result)
{
var contextProperty = item.GetType().GetProperty("Context");
SqlSugarContext newClient = this.Context.Utilities.CopyContext();
SqlSugarEngine newClient = this.Context.Utilities.CopyContext();
if (newClient.CurrentConnectionConfig.AopEvents == null)
newClient.CurrentConnectionConfig.AopEvents = new AopEvents();
contextProperty.SetValue(item, newClient, null);

6
Src/Asp.Net/SqlSugar/Abstract/SaveableProvider/SaveableProvider.cs

@ -9,19 +9,19 @@ namespace SqlSugar
{
public partial class SaveableProvider<T> : ISaveable<T> where T : class, new()
{
internal SaveableProvider(SqlSugarContext context,List<T> saveObjects)
internal SaveableProvider(SqlSugarEngine context,List<T> saveObjects)
{
this.saveObjects = saveObjects;
this.Context = context;
this.Context.InitMppingInfo<T>();
}
internal SaveableProvider(SqlSugarContext context, T saveObject)
internal SaveableProvider(SqlSugarEngine context, T saveObject)
{
this.saveObjects = new List<T>() { saveObject };
this.Context = context;
this.Context.InitMppingInfo<T>();
}
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public List<T> saveObjects = new List<T>();
public List<T> existsObjects = null;
public List<T> insertObjects

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/DeleteBuilder.cs

@ -13,7 +13,7 @@ namespace SqlSugar
#region Common Properties
public EntityInfo EntityInfo { get; set; }
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ILambdaExpressions LambdaExpressions { get; set; }
public List<SugarParameter> Parameters { get; set; }
public StringBuilder sql { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/InsertBuilder.cs

@ -18,7 +18,7 @@ namespace SqlSugar
#endregion
#region Common Properties
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ILambdaExpressions LambdaExpressions { get; set; }
public ISqlBuilder Builder { get; set; }
public StringBuilder sql { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/QueryBuilder.cs

@ -27,7 +27,7 @@ namespace SqlSugar
#region Service object
public StringBuilder sql { get; set; }
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ILambdaExpressions LambdaExpressions { get; set; }
public ISqlBuilder Builder { get; set; }
#endregion

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlBuilderProvider.cs

@ -10,7 +10,7 @@ namespace SqlSugar
public abstract partial class SqlBuilderProvider : SqlBuilderAccessory, ISqlBuilder
{
#region Properties
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public CommandType CommandType { get; set; }
public DeleteBuilder DeleteBuilder { get; set; }
public InsertBuilder InsertBuilder { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/SqlQueryBuilder.cs

@ -17,7 +17,7 @@ namespace SqlSugar
#endregion
#region Properties
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public string Fields
{
get

2
Src/Asp.Net/SqlSugar/Abstract/SqlBuilderProvider/UpdateBuilder.cs

@ -17,7 +17,7 @@ namespace SqlSugar
this.WhereValues = new List<string>();
this.Parameters = new List<SugarParameter>();
}
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ILambdaExpressions LambdaExpressions { get; set; }
public ISqlBuilder Builder { get; set; }
public StringBuilder sql { get; set; }

2
Src/Asp.Net/SqlSugar/Abstract/UpdateProvider/UpdateableProvider.cs

@ -12,7 +12,7 @@ namespace SqlSugar
public class UpdateableProvider<T> : IUpdateable<T> where T : class, new()
{
#region Property
public SqlSugarContext Context { get; internal set; }
public SqlSugarEngine Context { get; internal set; }
public EntityInfo EntityInfo { get; internal set; }
public ISqlBuilder SqlBuilder { get; internal set; }
public UpdateBuilder UpdateBuilder { get; set; }

2
Src/Asp.Net/SqlSugar/Entities/ModelContext.cs

@ -10,7 +10,7 @@ namespace SqlSugar
{
[SugarColumn(IsIgnore = true)]
[JsonIgnore]
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public ISugarQueryable<T> CreateMapping<T>() where T : class, new()
{
Check.ArgumentNullException(Context, "Please use Sqlugar.ModelContext");

6
Src/Asp.Net/SqlSugar/Infrastructure/ContextMethods.cs

@ -11,7 +11,7 @@ namespace SqlSugar
{
public partial class ContextMethods : IContextMethods
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
#region DataReader
/// <summary>
@ -268,9 +268,9 @@ namespace SqlSugar
return DeserializeObject<T>(jsonString);
}
}
public SqlSugarContext CopyContext(bool isCopyEvents = false)
public SqlSugarEngine CopyContext(bool isCopyEvents = false)
{
var newClient = new SqlSugarContext(this.TranslateCopy(Context.CurrentConnectionConfig));
var newClient = new SqlSugarEngine(this.TranslateCopy(Context.CurrentConnectionConfig));
newClient.CurrentConnectionConfig.ConfigureExternalServices = Context.CurrentConnectionConfig.ConfigureExternalServices;
newClient.MappingColumns = this.TranslateCopy(Context.MappingColumns);
newClient.MappingTables = this.TranslateCopy(Context.MappingTables);

4
Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarContext.cs → Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarEngine.cs

@ -15,11 +15,11 @@ namespace SqlSugar
/// ** date:2017/1/2
/// ** email:610262374@qq.com
/// </summary>
public partial class SqlSugarContext: ISqlSugarClient
public partial class SqlSugarEngine: ISqlSugarClient
{
#region Constructor
public SqlSugarContext(ConnectionConfig config)
public SqlSugarEngine(ConnectionConfig config)
{
this.Context = this;
this.CurrentConnectionConfig = config;

2
Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarAccessory.cs → Src/Asp.Net/SqlSugar/Infrastructure/SqlSugarEngine_Part2.cs

@ -7,7 +7,7 @@ using System.Text;
using System.Threading.Tasks;
namespace SqlSugar
{
public partial class SqlSugarContext
public partial class SqlSugarEngine
{
#region Properties
public ISqlSugarClient Context

2
Src/Asp.Net/SqlSugar/Interface/IAdo.cs

@ -16,7 +16,7 @@ namespace SqlSugar
IDbTransaction Transaction { get; set; }
IDataParameter[] ToIDbDataParameter(params SugarParameter[] pars);
SugarParameter[] GetParameters(object obj, PropertyInfo[] propertyInfo = null);
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
void ExecuteBefore(string sql, SugarParameter[] pars);
void ExecuteAfter(string sql, SugarParameter[] pars);
bool IsEnableLogEvent{get;set;}

2
Src/Asp.Net/SqlSugar/Interface/ICodeFirst.cs

@ -6,7 +6,7 @@ namespace SqlSugar
{
public partial interface ICodeFirst
{
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
ICodeFirst BackupTable(int maxBackupDataRows = int.MaxValue);
ICodeFirst SetStringDefaultLength(int length);
void InitTables(string entitiesNamespace);

4
Src/Asp.Net/SqlSugar/Interface/IContextMethods.cs

@ -10,14 +10,14 @@ namespace SqlSugar
{
public partial interface IContextMethods
{
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
ExpandoObject DataReaderToExpandoObject(IDataReader reader);
List<ExpandoObject> DataReaderToExpandoObjectList(IDataReader reader);
List<T> DataReaderToList<T>(IDataReader reader);
string SerializeObject(object value);
T DeserializeObject<T>(string value);
T TranslateCopy<T>(T sourceObject);
SqlSugarContext CopyContext(bool isCopyEvents = false);
SqlSugarEngine CopyContext(bool isCopyEvents = false);
dynamic DataTableToDynamic(DataTable table);
List<T> DataTableToList<T>(DataTable table);
ICacheService GetReflectionInoCacheInstance();

2
Src/Asp.Net/SqlSugar/Interface/IDMLBuilder.cs

@ -9,7 +9,7 @@ namespace SqlSugar
{
string SqlTemplate { get; }
List<SugarParameter> Parameters { get; set; }
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
StringBuilder sql { get; set; }
string ToSqlString();
void Clear();

2
Src/Asp.Net/SqlSugar/Interface/IDbBind.cs

@ -7,7 +7,7 @@ namespace SqlSugar
{
public partial interface IDbBind
{
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
List<string> GuidThrow { get; }
List<string> IntThrow { get; }
List<string> StringThrow { get; }

2
Src/Asp.Net/SqlSugar/Interface/IDbMaintenance.cs

@ -6,7 +6,7 @@ namespace SqlSugar
{
public partial interface IDbMaintenance
{
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
#region DML
List<DbTableInfo> GetViewInfoList(bool isCache=true);

2
Src/Asp.Net/SqlSugar/Interface/ILambdaExpressions.cs

@ -15,7 +15,7 @@ namespace SqlSugar
List<JoinQueryInfo> JoinQueryInfos { get; set; }
bool IsSingle { get; set; }
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
IDbMethods DbMehtods { get; set; }
Expression Expression { get; set; }
int Index { get; set; }

2
Src/Asp.Net/SqlSugar/Interface/ISqlBuilder.cs

@ -10,7 +10,7 @@ namespace SqlSugar
{
public partial interface ISqlBuilder
{
SqlSugarContext Context { get; set; }
SqlSugarEngine Context { get; set; }
CommandType CommandType { get; set; }
String AppendWhereOrAnd(bool isWhere, string sqlString);
string AppendHaving(string sqlString);

2
Src/Asp.Net/SqlSugar/OnlyNet/PostgreSQLExpressionContext.cs

@ -10,7 +10,7 @@ namespace SqlSugar
}
internal class PostgreSQLExpressionContext : ExpressionContext, ILambdaExpressions
{
public SqlSugarContext Context
public SqlSugarEngine Context
{
get
{

2
Src/Asp.Net/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs

@ -4,7 +4,7 @@ namespace SqlSugar
{
public class MySqlExpressionContext : ExpressionContext, ILambdaExpressions
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public MySqlExpressionContext()
{
base.DbMehtods = new MySqlMethod();

2
Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleExpressionContext.cs

@ -11,7 +11,7 @@ namespace SqlSugar
{
public partial class OracleExpressionContext : ExpressionContext, ILambdaExpressions
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public OracleExpressionContext()
{
base.DbMehtods = new OracleMethod();

2
Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerExpressionContext.cs

@ -11,7 +11,7 @@ namespace SqlSugar
{
public partial class SqlServerExpressionContext : ExpressionContext, ILambdaExpressions
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public SqlServerExpressionContext()
{
base.DbMehtods = new SqlServerMethod();

2
Src/Asp.Net/SqlSugar/Realization/Sqlite/SqlBuilder/SqliteExpressionContext.cs

@ -4,7 +4,7 @@ namespace SqlSugar
{
public class SqliteExpressionContext : ExpressionContext, ILambdaExpressions
{
public SqlSugarContext Context { get; set; }
public SqlSugarEngine Context { get; set; }
public SqliteExpressionContext()
{
base.DbMehtods = new SqliteMethod();

4
Src/Asp.Net/SqlSugar/SqlSugar.csproj

@ -277,8 +277,8 @@
<Compile Include="Interface\IContextMethods.cs" />
<Compile Include="Interface\IUpdateable.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Infrastructure\SqlSugarAccessory.cs" />
<Compile Include="Infrastructure\SqlSugarContext.cs" />
<Compile Include="Infrastructure\SqlSugarEngine_Part2.cs" />
<Compile Include="Infrastructure\SqlSugarEngine.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="References\MySql.Data.dll" />

2
Src/Asp.Net/SqlSugar/SqlSugarClient.cs

@ -691,7 +691,7 @@ namespace SqlSugar
{
config.AopEvents = new AopEvents();
}
_Context = new SqlSugarContext(config);
_Context = new SqlSugarEngine(config);
if (!aopIsNull)
_Context.Ado.IsEnableLogEvent = true;
this.CurrentConnectionConfig = config;

2
Src/Asp.Net/SqlSugar/Utilities/UtilConstants.cs

@ -42,6 +42,6 @@ namespace SqlSugar
internal static Type DicArraySS = typeof(Dictionary<string, string>);
internal static Type DicArraySO = typeof(Dictionary<string, object>);
public static Type SugarType = typeof(SqlSugarContext);
public static Type SugarType = typeof(SqlSugarEngine);
}
}

8
Src/Asp.Net/SqlSugar/Utilities/UtilExceptions.cs

@ -18,18 +18,18 @@ namespace SqlSugar
public SqlSugarException(string message)
: base(message){}
public SqlSugarException(SqlSugarContext context,string message, string sql)
public SqlSugarException(SqlSugarEngine context,string message, string sql)
: base(message) {
this.Sql = sql;
}
public SqlSugarException(SqlSugarContext context, string message, string sql, object pars)
public SqlSugarException(SqlSugarEngine context, string message, string sql, object pars)
: base(message) {
this.Sql = sql;
this.Parametres = pars;
}
public SqlSugarException(SqlSugarContext context, Exception ex, string sql, object pars)
public SqlSugarException(SqlSugarEngine context, Exception ex, string sql, object pars)
: base(ex.Message)
{
this.Sql = sql;
@ -40,7 +40,7 @@ namespace SqlSugar
this.Source = ex.Source;
}
public SqlSugarException(SqlSugarContext context, string message, object pars)
public SqlSugarException(SqlSugarEngine context, string message, object pars)
: base(message) {
this.Parametres = pars;
}

Loading…
Cancel
Save