Exemplo n.º 1
0
 internal static AlbumModel FromAlbum(Album album)
 {
     return new AlbumModel()
     {
         ID = album.ID,
         Title = album.Title,
         Producer = album.Producer,
         Year = album.Year
     };
 }
Exemplo n.º 2
0
        internal static Album ToAlbum(AlbumModel albumModel, Album album = null)
        {
            if (album == null)
            {
                album = new Album();
            }

            album.ID = albumModel.ID;
            album.Title = albumModel.Title;
            album.Producer = albumModel.Producer;
            album.Year = albumModel.Year;

            return album;
        }