Пример #1
0
        public void Update(TEntity entity)
        {
            var properties = _dataMapper.MapToProperties(entity);
            var expression = _expressionProvider.ProvideUpdateExpression(_tableName, entity.Id, properties);

            _connection.Execute(expression, entity, _transaction);
        }
Пример #2
0
        public void Update(TEntity entity)
        {
            var properties = _dataMapper.MapToProperties(entity);
            var expression = _expressionProvider.ProvideUpdateExpression(_tableName, entity.Id, properties);

            var command = new SqlCommand(expression, _connection)
            {
                Transaction = _transaction
            };

            command.ExecuteNonQuery();
        }