public PlasticSpoolViewModel(PlasticSpoolDto dto, IList <PlasticDto> plastics) { Id = dto.Id; TimeToManufacture = dto.TimeToManufacture; Hours = TimeToManufacture.Hours; Min = TimeToManufacture.Minutes; Mass = dto.Mass; ManufactureCost = dto.ManufactureCost; SellValue = dto.SellValue; PlasticId = dto.PlasticId; PlasticList = plastics.Select(x => new SelectListItem(x.Name + " -- " + x.LocationSource.Name, x.Id.ToString())); }
public PlasticSpoolViewModel(PlasticSpoolDto dto) { Id = dto.Id; TimeToManufacture = dto.TimeToManufacture; Hours = TimeToManufacture.Hours; Min = TimeToManufacture.Minutes; Mass = dto.Mass; ManufactureCost = dto.ManufactureCost; SellValue = dto.SellValue; PlasticId = dto.PlasticId; PlasticNameLoc = dto.Plastic.Name + " -- " + dto.Plastic.LocationSource.Name; }