title: Automapper with Child List Property Mapping Issue
body: <p>I am having following Models</p>
  
  <p><strong>Models</strong></p>
  
  <pre><code>public class Dish
  {
      [Required]
      public Int64 ID { get; set; }
      [Required]
      public string Name { get; set; }
      [Required]
      public string Description { get; set; }
      [Required]
      public double Price { get; set; }
      [Required]
      public DateTime From { get; set; }
      [Required]
      public DateTime To { get; set; }
      [Required]
      public bool IsAvailable { get; set; }
      [Required]
      public string MealImage { get; set; }
      [Required]
      public List&lt;Ingredients&gt; Ingredients { get; set; }
  }
  
  
  public class Ingredients
  {
      [Required]
      public Int64 ID { get; set; }
      [Required]
      public string Name { get; set; }
      [Required]
      public int Quantity { get; set; }
      [Required]
      public Int64 Dish_ID { get; set; }
      [ForeignKey("Dish_ID")]
      public virtual Dish Dish { get; set; }
  }
  </code></pre>
  
  <p>Following is the <strong>ViewModel</strong> for them</p>
  
  <pre><code> public class DishViewModel
  {
      public Int64 ID { get; set; }
      [Required]
      public string Name { get; set; }
      [Required]
      public string Description { get; set; }
      [Required]
      public double Price { get; set; }
      [Required]
      public DateTime From { get; set; }
      [Required]
      public DateTime To { get; set; }
      public bool IsAvailable { get; set; }
      public string MealImage { get; set; }
      [Required]
      public string IngredientsData { get; set; }
  
      public List&lt;IngredientsViewModel&gt; Ingredients { get; set; }
  }
  
   public class IngredientsViewModel
  {
      [Required]
      public string Name { get; set; }
      [Required]
      public int Quantity { get; set; }
      [Required]
      public Int64 Dish_ID { get; set; }
  }
  </code></pre>
  
  <p>I am using Automapper for mapping between them. Following is the code that I am using to Map the Dish to DishViewModel</p>
  
  <pre><code>public DishViewModel Create(Dish dish)
      {
          Mapper.Initialize(cfg =&gt; cfg.CreateMap&lt;Dish, DishViewModel&gt;()
          .ForMember(s =&gt; s.Ingredients, c =&gt; c.MapFrom(m =&gt; m.Ingredients))
          );
          DishViewModel dishViewModel = Mapper.Map&lt;DishViewModel&gt;(dish);
          return dishViewModel;
      }
  </code></pre>
  
  <p>I am getting following error in above process<a href="https://i.stack.imgur.com/Q3tXZ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Q3tXZ.png" alt="Error in Mapping"></a></p>
  
  <p>Can anybody please guide me what wrong I am doing in above process.</p>
  
  <p>Thanks</p>