Lazy Loading fix, new migration, Rents Index data
This commit is contained in:
@@ -9,18 +9,72 @@
|
||||
<div>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Car.Id)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Car.Id)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Car.Brand)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Car.Brand)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Car.Model)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Car.Model)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Car.CountPassengerSeats)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Car.CountPassengerSeats)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Car.PriceForDay)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Car.PriceForDay)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.StartDate)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.StartDate)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.EndDate)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.EndDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User.FirstName)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User.FirstName)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User.LastName)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User.LastName)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User.UserName)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User.UserName)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User.Email)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User.Email)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Car ID
|
||||
@Html.DisplayNameFor(model => model.Car.Id)
|
||||
</th>
|
||||
<th>
|
||||
Start Date
|
||||
@Html.DisplayNameFor(model => model.StartDate)
|
||||
</th>
|
||||
<th>
|
||||
End Date
|
||||
@Html.DisplayNameFor(model => model.EndDate)
|
||||
</th>
|
||||
<th>
|
||||
User
|
||||
@Html.DisplayNameFor(model => model.User.UserName)
|
||||
</th>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
@@ -37,28 +37,28 @@
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Car.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.StartDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EndDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.User.UserName)
|
||||
</td>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
@Html.DisplayFor(modelItem => item.Car.Id)
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.StartDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.EndDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.User.UserName)
|
||||
</td>
|
||||
@if (this.User.IsInRole("Admin"))
|
||||
{
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
|
||||
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
|
||||
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user