static void Main(string[] args) { InMemoryCarDal inMemoryCarDal = new InMemoryCarDal(); foreach (var car in inMemoryCarDal.GetAll()) { Console.WriteLine(car.Description); } }
static void Main(string[] args) { InMemoryCarDal inMemoryCarDal = new InMemoryCarDal(); foreach (var car in inMemoryCarDal.GetAll()) { Console.WriteLine(car.DailyPrice); } Console.ReadLine(); }
static void Main(string[] args) { ICarDal carDal = new InMemoryCarDal(); List <Car> cars = carDal.GetAll(); foreach (var car in cars) { Console.WriteLine(car.ModelYear); } }
static void Main(string[] args) { Car car = new Car(); car.Id = 5; car.BrandId = 6; car.ColorId = 10; car.DailyPrice = 350; car.Description = "Peugoet 301"; car.ModelYear = 2016; ICarDal cars = new InMemoryCarDal(); cars.Add(car); cars.Delete(3); cars.GetAll(); cars.GetById(4); cars.Update(2, car); }