@using Products.Common.Types
@using Products.Business.Domain;

@model Products.Business.Domain.Product
   @* [Required] *@
   @*  public string Name { get; set; } *@
   @*  [Required] *@
   @*  public Color Color { get; set; } *@
   @*  [Required] *@
   @*  public string Brand { get; set; } *@

<h1>Create Product</h1>

<form asp-action="Create" method="post">
    <div class="form-group">
        <label asp-for="Name" class="control-label"></label>
        <input asp-for="Name" class="form-control"/>
        <span asp-validation-for="Name" class="text-danger"></span>
    </div>

    <div class="form-group">
        <label asp-for="Color" class="control-label"></label>
        <select asp-for="Color" asp-items="@Html.GetEnumSelectList<Color>()" class="form-control">
        <option value="">-- Select Color --</option>
        </select>
        <span asp-validation-for="Color" class="text-danger"></span>
    </div>

    <div class="form-group">
        <label asp-for="Brand" class="control-label"></label>
        <input asp-for="Brand" class="form-control"/>
        <span asp-validation-for="Brand" class="text-danger"></span>
    </div>

    <div>
        <input type="submit"
               value="Save"
               class="btn btn-primary mt-2"
               />
    </div>
</form>


