This commit is contained in:
sunkaixuan
2017-05-29 14:19:12 +08:00
parent 8d0e441651
commit 5b5017756d
3 changed files with 6 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ namespace SqlSugar
{
if (deleteObjs == null || deleteObjs.Count() == 0)
{
Where("1=2 ");
Where(SqlBuilder.SqlFalse);
return this;
}
string tableName = this.Context.EntityProvider.GetTableName<T>();
@@ -123,7 +123,7 @@ namespace SqlSugar
{
if (primaryKeyValues == null || primaryKeyValues.Count() == 0)
{
Where("1=2 ");
Where(SqlBuilder.SqlFalse);
return this;
}
return In<PkType>(primaryKeyValues.ToArray());
@@ -133,7 +133,7 @@ namespace SqlSugar
{
if (primaryKeyValues == null || primaryKeyValues.Count() == 0)
{
Where("1=2 ");
Where(SqlBuilder.SqlFalse);
return this;
}
string tableName = this.Context.EntityProvider.GetTableName<T>();

View File

@@ -44,6 +44,7 @@ namespace SqlSugar
return " HAVING " + sqlString;
}
public virtual string SqlParameterKeyWord { get { return "@"; } }
public virtual string SqlFalse { get { return "1=2 "; } }
#endregion
}
}

View File

@@ -19,10 +19,12 @@ namespace SqlSugar
UpdateBuilder UpdateBuilder { get; set; }
string SqlParameterKeyWord { get; }
string SqlFalse { get; }
string GetTranslationTableName(string name);
string GetTranslationColumnName(string entityName, string propertyName);
string GetTranslationColumnName(string propertyName);
string GetNoTranslationColumnName(string name);
}
}