public IActionResult Create(Album objModel) { try { if (ModelState.IsValid) { if (AlbumDB.AddAlbum(objModel)) { ViewBag.Message = "Album has been successfully added."; ModelState.Clear(); } } return(View()); } catch (Exception) { return(View()); } }
public IActionResult Create(Album objModel) { try { if (ModelState.IsValid) { if (AlbumDB.AddAlbum(objModel)) { ViewBag.Message = "Album has been successfully added."; ModelState.Clear(); } } return(View()); } catch (Exception) { return(View()); } }