public ListProductVM() { this.repository = new ProductRepository(); List <Product> products = this.repository.List(); this.products = new ObservableCollection <DetailProductVM>(ProductBuilder.ConvertProductListToDetailProductVMList(products)); if (this.products != null && this.products.Count > 0) { this.selectedProduct = this.products.First(); } }