@model test.Models.Entities.Product


@using (Html.BeginForm("AddProduct","Product")) {
    <fieldset>
        <legend>Dodaj produkt</legend>

        @Html.ValidationSummary()

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <p>
            <input type="submit" value="Dodaj produkt" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Wróć do listy", "Products")
</div>
