public ConfigurationViewModel(Configuration model) { Accessories = model.Accessories.Select(cur => new AccessoryViewModel(cur)).ToList(); EngineSettings = new EngineSettingsViewModel(model.EngineSetting); Paint = new PaintViewModel(model.Paint); Rims = new RimViewModel(model.Rims); }
public CarModelViewModel(CarModel model) : base(model.Id) { BodyType = model.BodyCategory.Name; Series = model.SeriesCategory.Name; Year = model.Year; BaseSettings = new EngineSettingsViewModel(GetBaseSettings(model.EngineSettings)); }