Пример #1
0
        private static Car NewCar(BusinessManager businessManager)
        {
            Car car = new Car()
            {
                Name = "a"
            };

            businessManager.Add(car);
            car.Name       = "abc";
            car.DailyPrice = 0;
            businessManager.Add(car);

            car.DailyPrice = 111;
            car.BrandId    = 1;
            car.ColorId    = 1;
            var result = businessManager.GetAll();

            foreach (var item in result.Data)
            {
                var id = item.Id;
                car.Id = id + 1;
            }

            return(car);
        }