public ActionResult AddConfirmed(NewAlbumViewModel model) { if (!ModelState.IsValid) { ViewBag.Message = _helperService.ModelErrorsToString(ModelState); return(Add()); } var id = _albumsService.AddAlbum(model); return(RedirectToAction("Details", new { Id = id })); }
public IActionResult AddAlbum(Album alb) { _albumsService.AddAlbum(alb); return(RedirectToAction("Index", "Home")); }