title: How to do these mappings by using valueInjecter instead of AutoMapper
body: <p>I have used Automapper in one of my project before, now I want to use ValueInjecter for the other one.</p>
  
  <p><strong>These are ViewModels</strong></p>
  
  <pre><code>public class ApplicantListViewModel : BaseViewModel
  {
      public int Id {get; set;}
      public string Name {get;set;}
      public string CourseName {get;set;}
  
  }
  
  public class CourseListViewModel : BaseViewModel
  {
      public int Id {get; set;}
      public string Name {get;set;}
      public int Applicants {get;set;}
  }
  </code></pre>
  
  <p><strong>These are my DTOs</strong></p>
  
  <pre><code>public class Course : BaseEntity
  {
      public string Name { get; set; }
  
      public virtual IList&lt;Applicant&gt; Applicants { get; set; }
  }
  
  public class Applicant : BaseEntity
  {
      public string Name { get; set; }
  
      public int CourseId { get; set; }
      public virtual Course Course { get; set; }
  
  }
  </code></pre>
  
  <p><strong>I can map DTOs to ViewModels sth like below with Automapper</strong></p>
  
  <pre><code> AutoMapper.Mapper.CreateMap&lt;Applicant, ApplicantListViewModel&gt;();
  
   AutoMapper.Mapper.CreateMap&lt;Course, CourseListViewModel&gt;()
                  .ForMember(s =&gt; s.Applicants, d =&gt; d.MapFrom(s =&gt; s.Applicants.Count));
  </code></pre>
  
  <p>Then it is automatically map Course to CourseListViewModel and Applicant to ApplicantListViewModel. When it maps I can see that ApplicantListViewModel's CourseName' property gets its value from Course.Name without any special configuration by using AutoMapper but ValueInjector doesnt map(CourseName become null) it. Also CourseListViewModel's Applicants property gets its value from Applicants.Count with little configuration. </p>
  
  <p>How to do these mappings by ValueInjecter easier ?</p>