public void Setup() { var sampleDB = JsonConvert.DeserializeObject <Vehicles>(Sampledata.VehiclesJson); _vehicleService = new JsonVehicleService(sampleDB); //_vehicleService = new JsonVehicleService(Sampledata.VehiclesJson); //The JsonVehicleService can NOT have any 'if', 'for', 'foreach', or 'while' statements //you must use 'where', 'select', 'selectmany', 'union' with lambas }
public VehicleController() { if (_vehicleService == null) { _vehicleService = new JsonVehicleService(new Vehicles() { new Car() { Name = "Accord", Cost = "$30,000" } }); } }
public VehicleController() { if (_vehicleService == null) _vehicleService = new JsonVehicleService(new Vehicles() { new Car() { Name = "Accord", Cost = "$30,000" } }); }