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); }
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); }