public void SetTheTypeForThisCar(CarType carType) { if (carType == null || carType.IsTransient()) { throw new ArgumentException("Cannot associate transient or null car type"); } TypeId = carType.Id; Type = carType; }