Browse Source

Optimized code

pull/40/head
sunkaixuan 1 year ago
parent
commit
6d99e67740
  1. 2
      Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs

2
Src/Asp.NetCore2/SqlSugar/Abstract/DeleteProvider/DeleteableProvider.cs

@ -226,7 +226,7 @@ namespace SqlSugar
var expResult = DeleteBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle);
var whereString = expResult.GetResultString();
if (expression.ToString().Contains("Subqueryable()")) {
if (expression.Parameters.First().Type == typeof(T))
if (ExpressionTool.GetParameters(expression).First().Type == typeof(T))
{
var tableName = this.SqlBuilder.GetTranslationColumnName(this.EntityInfo.DbTableName);
whereString = whereString.Replace(tableName, $"( SELECT * FROM {tableName}) ");

Loading…
Cancel
Save