@model SportsStore.Domain.Entities.Product @{ ViewBag.Title = "Admin: Edit" + Model.Name; Layout = "~/Views/Shared/_AdminLayout.cshtml"; }

Edit @Model.Name

@using (Html.BeginForm()) {
@Html.HiddenFor(m => m.ProductID) @foreach (var property in ViewData.ModelMetadata.Properties) { if (property.PropertyName != "ProductID") {
@if (property.PropertyName == "Description") { @Html.TextArea(property.PropertyName, null, new { @class = "form-control", rows = 5 }) } else { @Html.TextBox(property.PropertyName, null, new { @class = "form-control" }) }
} }
}