public void OnNavigatedTo(NavigationContext navigationContext)
 {
     //this.laptopsCollection = null;
     this.Laptops = null;
     this.Laptops = new ObservableCollection <Laptop>(repository.GetAllLaptops());
     //this.Laptops = new ListCollectionView(this.laptopsCollection);
 }
 public AllLaptopsViewModel(IRegionManager regionManager, ILaptopRepository repository)
 {
     this.regionManager = regionManager;
     this.repository    = repository;
     Laptops            = new ObservableCollection <Laptop>(repository.GetAllLaptops());
     //this.laptopsCollection = new ObservableCollection<Laptop>(repository.GetAllLaptops());
     //this.Laptops = new ListCollectionView(this.laptopsCollection);
     this.editLaptopCommand = new DelegateCommand <Laptop>(this.EditLaptop, this.CanEditLaptop);
 }