mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
Code optimization WhereColumns
This commit is contained in:
@@ -256,6 +256,8 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PrimaryKeys.HasValue())
|
else if (PrimaryKeys.HasValue())
|
||||||
|
{
|
||||||
|
if (IsWhereColumns == false)
|
||||||
{
|
{
|
||||||
foreach (var item in PrimaryKeys)
|
foreach (var item in PrimaryKeys)
|
||||||
{
|
{
|
||||||
@@ -264,6 +266,7 @@ namespace SqlSugar
|
|||||||
whereString += Builder.GetTranslationColumnName(item) + "=" + this.Context.Ado.SqlParameterKeyWord + item;
|
whereString += Builder.GetTranslationColumnName(item) + "=" + this.Context.Ado.SqlParameterKeyWord + item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (PrimaryKeys.HasValue()&&IsWhereColumns)
|
if (PrimaryKeys.HasValue()&&IsWhereColumns)
|
||||||
{
|
{
|
||||||
foreach (var item in PrimaryKeys)
|
foreach (var item in PrimaryKeys)
|
||||||
|
Reference in New Issue
Block a user