src/Shared/EntityFramework/Core/Mapping/Update/Internal/DynamicUpdateCommand.cs
// <summary>
// Creates a new list of modification clauses with the specified remapped clauses replaced.
// </summary>
Creates a new list of modification clauses with the specified remapped clauses replaced.
Creates a new list of modification clauses with the specified remapped clauses replaced .
private static List<DbModificationClause> ReplaceClauses(
            IList<DbModificationClause> originalClauses, Dictionary<DbSetClause, DbSetClause> mappings)
        {
            var result = new List<DbModificationClause>(originalClauses.Count);
            for (var idx = 0; idx < originalClauses.Count; idx++)
            {
                DbSetClause replacementClause;
                if (mappings.TryGetValue((DbSetClause)originalClauses[idx], out replacementClause))
                {
                    result.Add(replacementClause);
                }
                else
                {
                    result.Add(originalClauses[idx]);
                }
            }
            return result;
        }
private static List < DbModificationClause > ReplaceClauses ( IList < DbModificationClause > originalClauses , Dictionary < DbSetClause , DbSetClause > mappings ) { var result = new List < DbModificationClause > ( originalClauses . Count ) ; for ( var idx = 0 ; idx < originalClauses . Count ; idx ++ ) { DbSetClause replacementClause ; if ( mappings . TryGetValue ( ( DbSetClause ) originalClauses [ idx ] , out replacementClause ) ) { result . Add ( replacementClause ) ; } else { result . Add ( originalClauses [ idx ] ) ; } } return result ; }
Creates a new list of modification clauses with the specified remapped clauses replaced.
Creates a new list of modification clauses with the specified remapped clauses replaced .
originalClauses
IList<DbModificationClause>
mappings
Dictionary<DbSetClause, DbSetClause>