Пример #1
0
        protected string ComposeVehicle(VehicleConditions condition, string make, string model, int year)
        {
            string vehicleCondition = "";

            if (condition == VehicleConditions.New)
            {
                vehicleCondition = "New";
            }
            else if ((condition == VehicleConditions.Used))
            {
                vehicleCondition = "Used";
            }

            return($"{vehicleCondition} {make} {model} {year}");
        }
Пример #2
0
 public Vehicle(
     int siteId,
     string title,
     string imageUrl,
     int year,
     string make,
     string model,
     VehicleConditions condition,
     string vin,
     string stock)
     : base()
 {
     SiteId    = siteId;
     Title     = title;
     ImageUrl  = imageUrl;
     Year      = year;
     Make      = make;
     Model     = model;
     Condition = condition;
     VIN       = vin;
     Stock     = stock;
 }