コード例 #1
0
 //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));
 }
コード例 #2
0
 //Constructor
 #region Preview
 public Preview(Persistence.Manufacturer manufacturer)
 {
     this.Guid          = manufacturer.Guid;
     this.Title         = manufacturer.Name;
     this.LogoImageGuid = manufacturer.PictureGuid;
 }
コード例 #3
0
 //Constructors
 #region ManufacturerViewModel
 public ManufacturerViewModel(Persistence.Manufacturer manufacturer)
 {
     this.Guid        = manufacturer.Guid;
     this.Name        = manufacturer.Name;
     this.PictureGuid = manufacturer.PictureGuid;
 }