Beispiel #1
0
        Album ConvertAlbum(AlbumInsDto dto)
        {
            Album album = new Album()
            {
                ID       = dto.AlbumID,
                Title    = dto.Title,
                ArtUrl   = dto.ArtUrl,
                Price    = dto.Price,
                ArtistID = dto.ArtistID,
                GenreID  = dto.GenreID,
                Stock    = dto.Stock
            };

            return(album);
        }
Beispiel #2
0
        public IActionResult GetAlbumByIdForAdmin(int id)
        {
            Album       incomingAlbum = albumBLL.Get(id);
            AlbumInsDto album         = new AlbumInsDto()
            {
                AlbumID  = incomingAlbum.ID,
                Title    = incomingAlbum.Title,
                ArtUrl   = incomingAlbum.ArtUrl,
                Price    = incomingAlbum.Price,
                Stock    = incomingAlbum.Stock,
                ArtistID = incomingAlbum.ArtistID,
                GenreID  = incomingAlbum.GenreID
            };

            return(Ok(album));
        }