@using System.Threading.Tasks @using ViewInjectSample.Model.Services @model ViewInjectSample.Model.Profile @inject ProfileOptionsService Options Update Profile

Update Profile

Name: @Html.TextBoxFor(m => m.Name)
Gender: @Html.DropDownList("Gender", Options.ListGenders().Select(g => new SelectListItem() { Text = g, Value = g }))
State: @Html.DropDownListFor(m => m.State.Code, Options.ListStates().Select(s => new SelectListItem() { Text = s.Name, Value = s.Code}))
Fav. Color: @Html.DropDownList("FavColor", Options.ListColors().Select(c => new SelectListItem() { Text = c, Value = c }))