From de93ee416ce565fecfa9c5accdc2134667bc5256 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Mon, 8 Aug 2022 13:01:37 +0800 Subject: [PATCH] Update .net core project --- Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs | 7 +++++++ .../SqlSugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs index 38756af35..25da2ad69 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DmProvider.cs @@ -41,6 +41,13 @@ namespace SqlSugar return sql; }; } + public override string SqlParameterKeyWord + { + get + { + return ":"; + } + } public override IDbConnection Connection { get diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs index bf530a475..b5e161b4d 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/SqlBuilder/DmQueryBuilder.cs @@ -49,9 +49,9 @@ namespace SqlSugar } this.OrderByValue = oldOrderBy; result = GetSqlQuerySql(result); - if (result.IndexOf("-- No table") > 0) + if (result.Contains("-- No table") ) { - return "-- No table"; + return "select * from (select 1 as id) where id=0 -- No table"; } return result; }