title: Loop Partial View with different model
body: <p>In my ViewModel i've got a list.</p>
  <p>For each value of this list i want to render the same partial view, with the values of the listitem.</p>
  <p>With my usage of it, it uses the view every time with the same Model.</p>
  <p>Here my example</p>
  <pre><code>@foreach (Date i in Model.Dates)
          {
          &lt;div class=&quot;d-inline-block badge-light align-content-between&quot; style=&quot;padding: 20px; border-radius: 40px;&quot;&gt;
  
              &lt;label class=&quot;form-check-label float-left&quot; style=&quot;padding:20px;&quot;&gt;
                  &lt;input type=&quot;checkbox&quot; class=&quot;form-check-input&quot; value=&quot;&quot;&gt;
  
              &lt;/label&gt;
              &lt;i class=&quot;fas fa-info-circle float-right&quot; data-toggle=&quot;modal&quot; data-target=&quot;#ModalView&quot;&gt;&lt;/i&gt;
              &lt;partial name=&quot;_DateModalPartial&quot; model=&quot;context.Dates.Find(i.Id)&quot; /&gt;
              
  
              &lt;div style=&quot;line-height:0.3; padding: 20px;&quot;&gt;
                  &lt;p class=&quot;text-center&quot;&gt;@String.Format(&quot;{0:dd/MM/yyyy}&quot;, i.StartingDate)&lt;/p&gt;
                  &lt;p class=&quot;text-center&quot;&gt;-&lt;/p&gt;
                  &lt;p class=&quot;text-center&quot;&gt;@String.Format(&quot;{0:dd/MM/yyyy}&quot;, i.EndingDate)&lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          
          }
  </code></pre>