Exemplo n.º 1
0
        public static CarDomainModel Create(Car car)
        {
            return new CarDomainModel
            {
                Id = car.Id,
                Make = car.Make,
                Model = car.Model,
                Available = car.Available,
                SegmentId = car.SegmentId,

            };
        }
Exemplo n.º 2
0
        private void FixupCar(Car previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.CarType, this))
            {
                previousValue.CarType = null;
            }

            if (Car != null)
            {
                Car.CarType = this;
            }
        }