/// <summary>
 /// Initializes a new ModificationFunctionMapping instance.
 /// </summary>
 /// <param name="entitySet">The entity or association set.</param>
 /// <param name="entityType">The entity or association type.</param>
 /// <param name="function">The metadata of function to which we should bind.</param>
 /// <param name="parameterBindings">Bindings for function parameters.</param>
 /// <param name="rowsAffectedParameter">The output parameter producing number of rows affected.</param>
 /// <param name="resultBindings">Bindings for the results of function evaluation</param>
 public ModificationFunctionMapping(
     EntitySetBase entitySet,
     EntityTypeBase entityType,
     EdmFunction function,
     IEnumerable <ModificationFunctionParameterBinding> parameterBindings,
     FunctionParameter rowsAffectedParameter,
     IEnumerable <ModificationFunctionResultBinding> resultBindings)
 {
     Check.NotNull <EntitySetBase>(entitySet, nameof(entitySet));
     Check.NotNull <EdmFunction>(function, nameof(function));
     Check.NotNull <IEnumerable <ModificationFunctionParameterBinding> >(parameterBindings, nameof(parameterBindings));
     this._function = function;
     this._rowsAffectedParameter = rowsAffectedParameter;
     this._parameterBindings     = new ReadOnlyCollection <ModificationFunctionParameterBinding>((IList <ModificationFunctionParameterBinding>)parameterBindings.ToList <ModificationFunctionParameterBinding>());
     if (resultBindings != null)
     {
         List <ModificationFunctionResultBinding> list = resultBindings.ToList <ModificationFunctionResultBinding>();
         if (0 < list.Count)
         {
             this._resultBindings = new ReadOnlyCollection <ModificationFunctionResultBinding>((IList <ModificationFunctionResultBinding>)list);
         }
     }
     this._collocatedAssociationSetEnds = new ReadOnlyCollection <AssociationSetEnd>((IList <AssociationSetEnd>)ModificationFunctionMapping.GetReferencedAssociationSetEnds(entitySet as EntitySet, entityType as EntityType, parameterBindings).ToList <AssociationSetEnd>());
 }