public ActionResult Create() { var model = new AlbumCrud { Artists = _dropListService.Artists(), Genres = _dropListService.Genres() }; return(View(model)); }
public ActionResult Create(AlbumCrud model) { if (ModelState.IsValid) { model.AlbumArtUrl = "/Content/Images/placeholder.gif"; _albumService.Save(model); return(RedirectToAction("Index/", "Store")); } model.Artists = _dropListService.Artists(); model.Genres = _dropListService.Genres(); return(View(model)); }