public void SetData( int year, EFuel fuel, EColor color, string modelId, DateTime?photoDate, Model model = null ) { this.Year = year; this.Fuel = fuel; this.Color = color; this.ModelId = modelId; this.PhotoDate = photoDate; this.Model = model; }
public Vehicle( string id, int year, EFuel fuel, EColor color, string modelId, DateTime?photoDate, Model model = null ) : this() { this.Id = string.IsNullOrWhiteSpace(id) ? RandomId.NewId() : id; this.SetData( year: year, fuel: fuel, color: color, modelId: modelId, photoDate: photoDate, model: model ); }