Esempio n. 1
0
        static void Main(string[] args)
        {
            InMemoryCarDal inMemoryCarDal = new InMemoryCarDal();

            foreach (var car in inMemoryCarDal.GetAll())
            {
                Console.WriteLine(car.Description);
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            InMemoryCarDal inMemoryCarDal = new InMemoryCarDal();

            foreach (var car in inMemoryCarDal.GetAll())
            {
                Console.WriteLine(car.DailyPrice);
            }
            Console.ReadLine();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            ICarDal carDal = new InMemoryCarDal();


            List <Car> cars = carDal.GetAll();

            foreach (var car in cars)
            {
                Console.WriteLine(car.ModelYear);
            }
        }
Esempio n. 4
0
        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);
        }