Exemplo n.º 1
0
        public Album CreateAlbum(string title)
        {
            Album album = new Album {
                Title = title
            };

            _repo.Add<Album>(album);
            _repo.SaveChanges();

            return album;
        }
Exemplo n.º 2
0
        public ActionResult Create(Album album)
        {
            _service.CreateAlbum(album.Title);

            return RedirectToRoute(new { Action = "Details", Controller = "Album", Id = album.Title });
        }