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