public iTabbedPage() { InitializeComponent(); DummyDB _context = new DummyDB(); List <string> allContinents = new List <string>(); // Retrieve and insert all continents from our list //foreach (var continent in _context.Animals) // allContinents.Add(continent.ContinentOrigin); // Distinct to remove duplicates //allContinents = allContinents.Distinct().ToList(); // Create dinamically tabs for continents that we have //foreach (var continent in allContinents) // Children.Add(new iTabPage(continent)); //New Repository repository = new Repository(); // List<Property> propertyList = repository.GetPropertyByUserSync(int.Parse(App.Current.Properties["UsersId"].ToString())); List <Property> propertyList = repository.GetPropertyByUserSync(7); propertyList = propertyList.Distinct().ToList(); foreach (var type in propertyList) { Children.Add(new iTabPage(int.Parse(type.ToString()))); } }
public AnimalViewModel() { Animals = new ObservableCollection <Animal>(); DummyDB _context = new DummyDB(); foreach (var animal in _context.Animals) { Animals.Add(animal); } }
public IEnumerable <Movie> GetMoviesRecomended(Client client) { var moviesRecommended = new List <Movie>(); foreach (var favorite in client.Favorites) { moviesRecommended.AddRange(DummyDB.GetMovieRecommendedByDirector(favorite.Director)); } // moviesRecommended = moviesRecommended.Where(x => !client.Favorites.Contains(x)).ToList(); return(moviesRecommended); }
public AnimalSecondViewModel(string continent) { Animals = new ObservableCollection <Animal>(); DummyDB _context = new DummyDB(); // Get only animals from that continent var animals = _context.Animals.Where(a => a.ContinentOrigin == continent).ToList(); foreach (var animal in animals) { Animals.Add(animal); } }
public AnimalTabbedPage() { InitializeComponent(); DummyDB _context = new DummyDB(); List <string> allContinents = new List <string>(); // Retrieve and insert all continents from our list foreach (var continent in _context.Animals) { allContinents.Add(continent.ContinentOrigin); } // Distinct to remove duplicates allContinents = allContinents.Distinct().ToList(); // Create dinamically tabs for continents that we have foreach (var continent in allContinents) { Children.Add(new AnimalTabPage(continent)); } }
public void EnclosureCleanUp() { DummyDB.CleanDb(); }
public void UserCleanUp() { DummyDB.CleanDb(); }