//Constructor #region Details public Details(Persistence.Manufacturer manufacturer) { this.Guid = manufacturer.Guid; this.Title = manufacturer.Name; this.LogoImageGuid = manufacturer.PictureGuid; this.Series = manufacturer.Series .Where(runner => runner.SeriesVehicles.Any()) .OrderBy(runner => runner.SeriesVehicles.Min(x => x.Vehicle.BuiltFromYear)) .Select(runner => new SeriesViewModel(runner)); this.Vehicles = manufacturer.ManufacturerVehicles .OrderBy(runner => runner.Vehicle.BuiltFromYear) .Select(runner => new VehicleTeaserViewModel(runner.Vehicle)); }
//Constructor #region Preview public Preview(Persistence.Manufacturer manufacturer) { this.Guid = manufacturer.Guid; this.Title = manufacturer.Name; this.LogoImageGuid = manufacturer.PictureGuid; }
//Constructors #region ManufacturerViewModel public ManufacturerViewModel(Persistence.Manufacturer manufacturer) { this.Guid = manufacturer.Guid; this.Name = manufacturer.Name; this.PictureGuid = manufacturer.PictureGuid; }