public ActionResult Create() { //m.User.Name var addArtistForm = new ArtistAddFormViewModel(); addArtistForm.Executive = m.User.Name; addArtistForm.GenreList = new SelectList(m.GenreGetAll(), "Name", "Name"); return(View(addArtistForm)); }
public ActionResult Create() { var form = new ArtistAddFormViewModel(); // Configure the SelectList for the item-selection element on the HTML Form form.GenreList = new SelectList(m.GenreGetAll(), "Name", "Name"); return(View(form)); }
// GET: Artists/Create public ActionResult Create() { var form = new ArtistAddFormViewModel(); form.GenreList = new SelectList (items: m.GetAllGenres(), dataValueField: "Id", dataTextField: "Name"); return(View(form)); }