Open AmitRathod07 opened 1 year ago
<table> <thead> <tr> <th>@Html.DisplayNameFor(model => model.ProfilePictureURL)</th> <th>@Html.DisplayNameFor(model => model.FullName)</th> <th>@Html.DisplayNameFor(model => model.Bio)</th> <th>Actions</th> </tr> </thead> <tbody> **@foreach (var item in Model)** { <tr> <td class="align-middle"> <img class="rounded-circle" src="@item.ProfilePictureURL" alt="@item.FullName" style="max-width: 150px" /> </td> <td class="align-middle"> @Html.DisplayFor(modelItem => item.FullName) </td> <td class="align-middle"> @Html.DisplayFor(modelItem => item.Bio) </td> <td class="align-middle"> <a class="btn btn-outline-primary"><i class="bi bi-pencil-square"></i>Edit </a> | <a class="btn btn-outline-info"><i class="bi bi-eye"></i>Details </a> | <a class="btn btn-danger text-white"><i class="bi bi-trash"></i>Delete </a> </td> </tr> } </tbody> </table>
@AmitRathod07 may be the model your retrieving from controller is null
return view(data); on Actors Controller
Maybe data is null.