public static ManagementFactor ToManagementFactor(this ManagementFactorDto dto) { if (dto == null) { return(null); } ManagementFactor entity = new ManagementFactor(); entity.CopyPropertiesFrom(dto); return(entity); }
public static ManagementFactorDto ToManagementFactorDto(this ManagementFactor entity, DictionaryItemDto factorGroup) { if (entity == null) { return(null); } ManagementFactorDto dto = new ManagementFactorDto(); dto.CopyPropertiesFrom(entity); dto.Unit = entity.MeasureUnit.ToMeasureUnitDto(); dto.DataType = entity.DataType.ToDictionaryItemDto <FactorDataType>(); dto.FactorGroup = factorGroup; return(dto); }