Esempio n. 1
0
        public void LoadMyCars()
        {
            MainDatabaseSourceDataContext dataContext = new MainDatabaseSourceDataContext();
            IEnumerable <string>          tempCars    = dataContext.ExecuteQuery <string>("select name from myCars");

            Cars = new ObservableCollection <string>(tempCars);
        }
Esempio n. 2
0
        public SearchModel()
        {
            MainDatabaseSourceDataContext dataContext = new MainDatabaseSourceDataContext();
            IEnumerable <myCar>           tempCars    = dataContext.ExecuteQuery <myCar>("select * from myCars");

            if (Mycars007 != null)
            {
                Mycars007.Clear();
            }
            Mycars007 = new ObservableCollection <myCar>(tempCars);
        }