public WeighScale Map(WeighScaleDTO dto) { if (dto == null) return null; var weighScale = Mapper.Map<WeighScaleDTO, WeighScale>(dto); weighScale.CostCentre = _hubRepository.GetById(dto.HubId) as Hub; return weighScale; }
private WeighScaleDTO Map(tblEquipment tbl) { var dto = new WeighScaleDTO { MasterId = tbl.Id, DateCreated = tbl.IM_DateCreated, DateLastUpdated = tbl.IM_DateLastUpdated, StatusId = tbl.IM_Status, Name = tbl.Name, Code = tbl.Code, Description = tbl.Description, EquipmentNumber = tbl.EquipmentNumber, EquipmentTypeId = tbl.EquipmentType, HubId = tbl.CostCentreId, Make = tbl.Make, Model = tbl.Model }; return dto; }