public ComicHoarderViewModel()
        {
            repository = new RepositoryService();
            webDataService = new WebDataService(repository.GetSetting("ComicVineKey"));

            Publishers = new ObservableCollection<Publisher>(repository.GetPublishers());
            if (Publishers.Count() > 0) 
            {
                selectedPublisher = Publishers[0].id; //select first publisher
            }

            if (selectedPublisher != 0) //no publisher selected
            {
                Volumes = new ObservableCollection<Volume>(repository.GetVolumes(selectedPublisher)); //get volumes from selected publisher
                if (Volumes.Count() > 0)
                {
                    selectedVolume = Volumes[0].id; //select first volume
                }
            }
            else
            {
                Volumes = new ObservableCollection<Volume>(); //empty volumes
            }

            if (selectedVolume != 0)
            {
                Issues = new ObservableCollection<Issue>(repository.GetIssues(selectedVolume));
                if (Issues.Count() > 0)
                {
                    selectedIssue = Issues[0].id;
                }
            }
            else
            {
                Issues = new ObservableCollection<Issue>();
            }

            MissingIssues = new ObservableCollection<MissingIssue>(repository.GetMissingIssues(selectedPublisher));

            PieChartRatios = ReloadPieChart(SelectedPublisher);

            BarChartRatios = new ObservableCollection<KeyValuePair<string, int>>();
            List<int> publisherIds = (from p in Publishers
                                        where p.enabled == true
                                        select p.id).ToList();
            BarChartMissingIssueCount barratios = repository.GetBarChartData(publisherIds);
            foreach (KeyValuePair<string, int> barratio in barratios.MissingIssueCountList)
            {
                BarChartRatios.Add(barratio);
            }
            //TODO move default path to config file
            Path = @"D:\Incoming\";
        }
 public PublisherSearchViewModel()
 {
     repository = new RepositoryService();
     webDataService = new WebDataService(repository.GetSetting("ComicVineKey"));
     Publishers = new ObservableCollection<Publisher>();
 }