title: Automapper not working with .MapFrom on ternary and calculated value with Net Core 2.2
body: <p>I ma using;</p>
  
  <p><code>AutoMapper.Extensions.Microsoft.DependencyInjection 6.0.0</code> </p>
  
  <p>in a web api project trunning <code>net core 2.2</code></p>
  
  <p>when mapping my DTO object I use Automapper to map a few fields;</p>
  
  <pre><code>public class AutoMapperProfile : AutoMapper.Profile
  {
      public AutoMapperProfile()
      {     
          CreateMap&lt;ReviewPostInputModel, Review&gt;()
              .ForMember(x =&gt; x.ReceiveThirdPartyUpdates, opt =&gt; opt.MapFrom(src =&gt; src.ReceiveThirdPartyUpdates ? (DateTime?)DateTime.UtcNow : null))
              .ForMember(x =&gt; x.ReceiveUpdates, opt =&gt; opt.MapFrom(src =&gt; src.ReceiveUpdates ? (DateTime?)DateTime.UtcNow : null))
              .ForMember(x =&gt; x.AverageScore, opt =&gt; opt.MapFrom(src =&gt; (decimal)Math.Round((src.Courtsey + src.Reliability + src.Tidiness + src.Workmanship) / 4, 2)));
          // ...
      }
  }
  </code></pre>
  
  <p>Where;</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Text;
  
  public class Review 
  {
      // ...
  
      public decimal Reliability { get; set; }
      public decimal Tidiness { get; set; }
      public decimal Courtsey { get; set; }
      public decimal Workmanship { get; set; }
  
      public decimal AverageScore { get; set; }
      public DateTime? ReceiveUpdates { get; set; }
      public DateTime? ReceiveThirdPartyUpdates { get; set; }
  } 
  </code></pre>
  
  <p>However, when I try to map using;</p>
  
  <pre><code>var review = _mapper.Map&lt;Review&gt;(model);
  </code></pre>
  
  <p>All standard members are mapped bar my <code>ForMember</code> listed above, where the DateTimes are set to a new instance of <code>DateTime</code> and Averagescore is set to 0.</p>
  
  <p>For completness I DI the mapper into my controller as follows;</p>
  
  <pre><code>private readonly IMapper _mapper;
  
  public ReviewController( IMapper mapper)
  {
      _mapper = mapper;
  }
  </code></pre>
  
  <p>I configure Automapper in my <code>StartUp.cs</code> as follows;</p>
  
  <pre><code>services.AddAutoMapper();
  </code></pre>
  
  <p>I have also tried adding a test to the controller to confirm that the values from the input are not the issue (completed after the map and can confirm that this value is correctly updated);</p>
  
  <pre><code>review.AverageScore = (decimal)Math.Round((model.Courtsey + model.Reliability + model.Tidiness + model.Workmanship) / 4, 2);
  </code></pre>
  
  <p>Does anyone have any ideas why this is occurring?</p>