Beispiel #1
0
        public IEnumerable <Car> GetCars()
        {
            var inserter      = new InsertIntoDatabase();
            var cars_document = Cars.GetCars();

            inserter.InsertCars(cars_document);
            var getter = new DataBaseTaker();
            var cars   = getter.GetAllCars();

            return(cars);
        }
Beispiel #2
0
        public Car GetCar(ObjectId id, string key)
        {
            var inserter      = new InsertIntoDatabase();
            var cars_document = Cars.GetCars();

            inserter.InsertCars(cars_document);
            var getter = new DataBaseTaker();
            var car    = getter.GerCarById(id);

            return(car);
        }