title: Bind Model inside list to a repeater
body: <p>I have a list of Employeements Object like this</p>
  
  <pre><code>List&lt; Employeements&gt;
  public class Employeements
  {
      public string EmploymentId { get; set; }
      public string ExternalId { get; set; }
      public ComapnyDetailResponse Employer { get; set; }
  }
  </code></pre>
  
  <p>As you can see final field <code>Employer</code> is another model object. And it is consisted of data like this:</p>
  
  <pre><code>public class ComapnyDetailResponse
  {
      public string id { get; set; }
      public string vatNumber { get; set; }
      public string name { get; set; }
  }
  </code></pre>
  
  <p>Now I want to bind  <code>List&lt;Employeements&gt;</code> to a repeater that will consist of fields from both <code>Employeements</code> and <code>ComapnyDetailResponse</code>. </p>
  
  <p>How can I achieve this or in other words what is the best way?</p>
  
  <p>My current code is like this</p>
  
  <pre><code>List&lt;Employeements&gt; userEmployeements = _rb.GetUserEmployeements(); //returns a list of Employeements
  rptEmployeements.DataSource = userEmployeements; // rptEmployeements is the repeater
  rptEmployeements.DataBind();
  
  
  &lt;asp:Repeater runat="server" ID="Repeater1"&gt;
      &lt;ItemTemplate&gt;
          &lt;div class="education-item"&gt;
              &lt;p&gt;EmploymentId:&lt;input type="text" name="txtCompany" value="&lt;%#Eval("EmploymentId") %&gt;" /&gt;&lt;/p&gt;
              &lt;p&gt;vatNumber:&lt;input type="text" name="txtCompany" value="&lt;%#Eval("vatNumber") %&gt;" /&gt;&lt;/p&gt;
                      vatNumber
           &lt;/div&gt;
       &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>