title: Automapper Missing Map Configuration
body: <p>I have an Attendee Class and An AttendeeViewModel</p>
  
  <p>The datetime field on the Attendee Model gets set to the default .NET Datetime when i map it from AttendeeViewModel instead of the value that is already existing in the Attendee Model</p>
  
  <p>Here's my AttendeeViewModel</p>
  
  <pre><code>public class AttendeeViewModel
  {
  
      public int Id { get; set; }
      [Required]
      [EmailAddress]
      public string Email { get; set; }
      [Required]
      [Display(Name = "First Name")]
      public string FirstName { get; set; }
      [Required]
      [Display(Name = "Last Name")]
      public string LastName { get; set; }
      public int FEventId { get; set; }
  
      public string DisplayName
      {
          get { return string.Format("{0}, {1}", FirstName, LastName); }
      }
  }
  </code></pre>
  
  <p>Here's my Base AttendeeModel</p>
  
  <pre><code>public class Attendee
  {
      [Key]
      [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
      public  int Id { get; set; }
      [Required]
      public  string Email { get; set; }
      [Required]
      public  string FirstName { get; set; }
      [Required]
      public  string LastName { get; set; }
      public DateTime CreatedAt { get; set; }
  
      public bool IsActive { get; set; }
  
  
      public int FEventId { get; set; }
  
      public virtual ApplicationUser CreatedBy { get; set; }
  
      public virtual FEvent FEvent { get; set; }
  
      public ICollection&lt;ProjectPledge&gt; ProjectPledges { get; set; } 
  
  }
  </code></pre>
  
  <p>Here's My mapping configuration</p>
  
  <pre><code>public static void Configure()
      {
  
         Mapper.CreateMap&lt;AttendeeViewModel, Attendee&gt;().ForMember(dest=&gt;dest.CreatedAt , opt=&gt;opt.Ignore());
  
      } 
  </code></pre>
  
  <p>And heres's the Controller Action</p>
  
  <pre><code>[HttpPost]
      [ValidateAntiForgeryToken]
      public virtual ActionResult Edit(AttendeeViewModel attendee)
      {
          if (!_attendeeService.CanAddAttendee(attendee.Email, attendee.FilanthropyEventId))
          {
              AddEmailModelError();
          }
  
          if (ModelState.IsValid)
          {
              var mappedAttendee = _attendeeService.GetById(attendee.Id);
  
              mappedAttendee = Mapper.Map&lt;AttendeeViewModel, Attendee&gt;(attendee);
              _attendeeService.AddOrUpdate(mappedAttendee);
              return RedirectToAction(MVC.Attendee.Index(mappedAttendee.FilanthropyEventId));
          }
          return View(attendee);
      }
  </code></pre>
  
  <p>if I set the configuration to be this insetad of <code>opt.Ignore()</code></p>
  
  <pre><code>Mapper.CreateMap&lt;AttendeeViewModel, Attendee&gt;().ForMember(dest=&gt;dest.CreatedAt , opt=&gt;opt.UseDestinationValue());
  </code></pre>
  
  <p>The Mapping fails giving this exception</p>
  
  <pre><code>Missing type map configuration or unsupported mapping.
  
  Mapping types:
  AttendeeViewModel -&gt; DateTime
  MyProject.Web.ViewModels.AttendeeViewModel -&gt; System.DateTime
  
  Destination path:
  Attendee.CreatedAt.CreatedAt
  
  Source value:
  MyProject.Web.ViewModels.AttendeeViewModel
  </code></pre>
  
  <p>Any ideas on how i can resolve this?</p>