예제 #1
0
        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);
        }
예제 #2
0
        private Task <int> ExecuteUpdateAsync(Persist persist)
        {
            var parameters = PopulateParameters(persist);

            return(_connection.ExecuteAsync(persist.Sql, parameters, transaction: _transaction));
        }
예제 #3
0
        private void ExecuteUpdate(Persist persist)
        {
            var parameters = PopulateParameters(persist);

            _connection.Execute(persist.Sql, parameters, transaction: _transaction);
        }