Example #1
0
        public ActionResult Create()
        {
            var o = new ArtistAddForm();

            o.GenreList = new SelectList(m.GenreGetAll(), "Name", "Name");
            return(View(o));
        }
Example #2
0
        public ActionResult Create()
        {
            var form = new ArtistAddForm();

            form.GenreList = new SelectList(m.GenreGetAll(), "Id", "Name");

            return(View(form));
        }
        public ActionResult Create()
        {
            var form = new ArtistAddForm();

            form.GenreList = new SelectList
                                 (items: m.GenreGetAll(),
                                 dataValueField: "Name",
                                 dataTextField: "Name");

            return(View(form));
        }