Example #1
0
        public static Artists ConvertToData(this ArtistModel model)
        {
            var data = new Artists()
            {
                ArtistId    = model.ArtistID,
                AlbumName   = model.AlbumName,
                ArtistName  = model.ArtistName,
                ImageUrl    = model.ImageURL,
                ReleaseDate = model.ReleaseDate,
                Price       = model.Price,
                SampleUrl   = model.SampleURL
            };

            return(data);
        }
Example #2
0
        public static ArtistModel ConvertToModel(this Artists data)
        {
            var model = new ArtistModel()
            {
                ArtistID    = data.ArtistId,
                AlbumName   = data.AlbumName,
                ArtistName  = data.ArtistName,
                ImageURL    = data.ImageUrl,
                ReleaseDate = data.ReleaseDate,
                Price       = data.Price,
                SampleURL   = data.SampleUrl
            };

            return(model);
        }