title: Partial View not loading data
body: <p>I am trying to load a partial view of inside a tab but its not showing data.</p>
  
  <p>I am using the following code can I not just do a loop using razor code this is in a partial view which I wish to load in from another view</p>
  
  <pre><code>@model IEnumerable&lt;solitude.models.ProductImages&gt;
  
  
  @{
      ViewData["Title"] = "ProductPicturesList";
      Layout = "~/Views/Shared/_LoginAdminLte.cshtml";
  }
  
  &lt;h2&gt;ProductPicturesList&lt;/h2&gt;
  
  
  
  &lt;table class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;
                 Picture Title
              &lt;/th&gt;
  
  
              &lt;th&gt;
                  Image
              &lt;/th&gt;
  
  
      &lt;/thead&gt;
  
      &lt;tbody&gt;
          @foreach (var item in Model)
          {
              &lt;tr&gt;
                  &lt;td&gt;
                      @Html.DisplayFor(modelItem =&gt; item.Title)
                  &lt;/td&gt;
              &lt;/tr&gt;
  
  
          &lt;td&gt;
              &lt;a asp-action="Edit" asp-route-id="@item.ProductID"&gt;Edit&lt;/a&gt; |
              &lt;a asp-action="Details" asp-route-id="@item.ProductID"&gt;Details&lt;/a&gt; |
              &lt;a asp-action="Delete" asp-route-id="@item.ProductID"&gt;Delete&lt;/a&gt;
          &lt;/td&gt;
  
          }
          &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>Its cause in the main list I am using a view model but I want to show a list of pictures above the form upload what would my best way of doing this be as obv  it is not returning anyresults I am using a controller for my main page.</p>
  
  <pre><code>@model solitude.models.Models.ViewModels.ProductImageVm 
  @*
      For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
  *@
  
  @Html.PartialAsync("_ProductPicturesList.cshtml")
  
  &lt;div class="form-group"&gt;
  
   &lt;form asp-controller="Products" asp-action="FileUpload" asp-route-returnurl="@ViewData["ReturnUrl"]" enctype="multipart/form-data" method="post" class="form-horizontal" role="form"&gt;
  
  
  
      &lt;input asp-for="Title" /&gt;
      &lt;input asp-for="ProductId" type="hidden" /&gt;
      &lt;input asp-for="Image" /&gt;
      &lt;input type="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Edit 2</strong>
  My Product Images as a class should this be changed</p>
  
  <pre><code>public   class ProductImages
  {
  
  
          [Key]
          public int ProductImageId { get; set; }
  
          public int ProductID { get; set; }
  
  
          public string ProductImageTitle { get; set; }
          public string ProductImageUploadUrl { get; set; }
          public string ProductImageRealPath { get; set; }
  
          public string ServerIpAddress { get; set; }
          public string ProductImageAltTag { get; set; }
  
          public int DisplayOrder { get; set; }
  
          public string Image { set; get; }
  
      }
  }
  </code></pre>