private static Persist GetUpdate(Persist persist, IList <Property> primaryKeys) { var conditions = PrimaryKeysToSql.ConvertToSql(primaryKeys); persist.Sql += " WHERE " + conditions.Builder; foreach (var parameter in conditions.Parameters) { persist.Parameters.Add(new QueryParameter { Name = parameter.Key, Value = parameter.Value }); } return(persist); }
private Task <int> ExecuteUpdateAsync(Persist persist) { var parameters = PopulateParameters(persist); return(_connection.ExecuteAsync(persist.Sql, parameters, transaction: _transaction)); }
private void ExecuteUpdate(Persist persist) { var parameters = PopulateParameters(persist); _connection.Execute(persist.Sql, parameters, transaction: _transaction); }