This commit is contained in:
sunkaixuan
2017-05-20 18:48:14 +08:00
parent 6a0252c7b9
commit 3f5291de7f
2 changed files with 5 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ namespace SqlSugar
public string TableName { get; set; }
public string TableWithString { get; set; }
public List<DbColumnInfo> DbColumnInfoList { get; set; }
public List<string> WhereValues { get; set; }
public List<KeyValuePair<string, string>> SetValues { get; set; }
public bool IsUpdateNull { get; set; }
public bool IsReturnIdentity { get; set; }

View File

@@ -50,7 +50,8 @@ namespace SqlSugar
public KeyValuePair<string, List<SugarParameter>> ToSql()
{
return new KeyValuePair<string, List<SugarParameter>>();
string sql = UpdateBuilder.ToSqlString();
return new KeyValuePair<string, List<SugarParameter>>(sql, UpdateBuilder.Parameters);
}
public IUpdateable<T> Update(T InsertObj)
@@ -76,6 +77,8 @@ namespace SqlSugar
}
public IUpdateable<T> Where(Expression<Func<T, bool>> expression)
{
var expResult = UpdateBuilder.GetExpressionValue(expression, ResolveExpressType.WhereSingle);
UpdateBuilder.WhereValues.Add(expResult.GetResultString());
return this;
}
public IUpdateable<T> With(string lockString)