src/Shared/EntityFramework/Core/Mapping/Update/Internal/DynamicUpdateCommand.cs
// <summary>
// Gets DB command definition encapsulating store logic for this command.
// </summary>
Gets DB command definition encapsulating store logic for this command.
Gets DB command definition encapsulating store logic for this command .
protected virtual DbCommand CreateCommand(Dictionary<int, object> identifierValues)
        {
            var commandTree = _modificationCommandTree;
            if (null != _inputIdentifiers)
            {
                var modifiedClauses = new Dictionary<DbSetClause, DbSetClause>();
                for (var idx = 0; idx < _inputIdentifiers.Count; idx++)
                {
                    var inputIdentifier = _inputIdentifiers[idx];
                    object value;
                    if (identifierValues.TryGetValue(inputIdentifier.Key, out value))
                    {
                        var newClause = new DbSetClause(inputIdentifier.Value.Property, DbExpressionBuilder.Constant(value));
                        modifiedClauses[inputIdentifier.Value] = newClause;
                        _inputIdentifiers[idx] = new KeyValuePair<int, DbSetClause>(inputIdentifier.Key, newClause);
                    }
                }
                commandTree = RebuildCommandTree(commandTree, modifiedClauses);
            }
            return Translator.CreateCommand(commandTree);
        }
protected virtual DbCommand CreateCommand ( Dictionary < int , object > identifierValues ) { var commandTree = _modificationCommandTree ; if ( null != _inputIdentifiers ) { var modifiedClauses = new Dictionary < DbSetClause , DbSetClause > ( ) ; for ( var idx = 0 ; idx < _inputIdentifiers . Count ; idx ++ ) { var inputIdentifier = _inputIdentifiers [ idx ] ; object value ; if ( identifierValues . TryGetValue ( inputIdentifier . Key , out value ) ) { var newClause = new DbSetClause ( inputIdentifier . Value . Property , DbExpressionBuilder . Constant ( value ) ) ; modifiedClauses [ inputIdentifier . Value ] = newClause ; _inputIdentifiers [ idx ] = new KeyValuePair < int , DbSetClause > ( inputIdentifier . Key , newClause ) ; } } commandTree = RebuildCommandTree ( commandTree , modifiedClauses ) ; } return Translator . CreateCommand ( commandTree ) ; }
Gets DB command definition encapsulating store logic for this command.
Gets DB command definition encapsulating store logic for this command .
// check if any server gen identifiers need to be set // reset the value of the identifier
identifierValues
Dictionary<int, object>