@Html.DropDownListFor(m => m.Name, ViewBag.Name as SelectList , "-- Select Role", new { @class = "form-control" }) }
public ActionResult Register() { ViewBag.Name = new SelectList (_db.Roles.ToList(), "Name", "Name"); return View(); }
Давайте посмотрим на SelectList(IEnumerable, String, String)
SelectList(IEnumerable, String, String)
public SelectList (System.Collections.IEnumerable items, string dataValueField, string dataTextField);
Поэтому убедитесь, что модель Roles имеет значение Name.
Roles
Name