Exemplo n.º 1
0
        public ComicViewModel MapToViewModel(Comic comic)
        {
            var viewModel = new ComicViewModel();

            MapToViewModel(comic, viewModel);
            return(viewModel);
        }
Exemplo n.º 2
0
 public void MapToViewModel(Comic comic, ComicViewModel viewModel)
 {
     viewModel.Id               = comic.Id;
     viewModel.Name             = comic.Name;
     viewModel.DownloadedStrips = comic.DownloadedStrips;
     viewModel.Status           = MapStatus(comic);
     if (comic.CurrentPage != null)
     {
         viewModel.CurrentPage = comic.CurrentPage.AbsoluteUri;
     }
     else
     {
         viewModel.CurrentPage = comic.Definition.StartAt;
     }
 }