title: Automapper: passing parameter to Map method
body: <p>I'm using <a href="https://automapper.org/" rel="noreferrer">Automapper</a> in a project and I need to dynamically valorize a field of my destination object.</p>
  
  <p>In my configuration I have something similar:</p>
  
  <pre><code>cfg.CreateMap&lt;Message, MessageDto&gt;()
      // ...
      .ForMember(dest =&gt; dest.Timestamp, opt =&gt; opt.MapFrom(src =&gt; src.SentTime.AddMinutes(someValue)))
      //...
      ;
  </code></pre>
  
  <p>The <code>someValue</code> in the configuration code is a parameter that I need to pass at runtime to the mapper and is not a field of the source object.</p>
  
  <p>Is there a way to achieve this? Something like this:</p>
  
  <pre><code>Mapper.Map&lt;MessageDto&gt;(msg, someValue));
  </code></pre>