public void EditAlbum(Album album) { var original = this.FindAlbum(album.Id); original.Title = album.Title; original.Description = album.Description; _repo.SaveChanges(); }
public ActionResult Create(Album album) { if(ModelState.IsValid) { _albumService.CreateAlbum(album); return RedirectToAction("Index"); } return View(); }
public void CreateAlbum(Album album) { _repo.Add<Album>(album); _repo.SaveChanges(); }
public void EditAlbum(Album album) { var original = this.FindAlbum(album.Id); original.AlbumName = album.AlbumName; _repo.SaveChanges(); }