public static SettingsMoleculeEntity FromDtoToEntity(SettingsMoleculeDto source) { SettingsMoleculeEntity target = new SettingsMoleculeEntity(); target.Id = source.Id; target.OverrideAcceptable = source.OverrideAcceptable; target.OverrideOptimal = source.OverrideOptimal; target.SettingsAtom.Add(SettingsAtomAssembler.FromDtoToEntity(source.PredefinedAtom)); target.SettingsAtom.Add(SettingsAtomAssembler.FromDtoToEntity(source.StatisticalAtom)); target.AnalyticRuleSettingsEntityId = source.AnalyticRuleSettingsId; return(target); }
public static SettingsMoleculeDto FromEntityToDto(SettingsMoleculeEntity source) { SettingsMoleculeDto target = new SettingsMoleculeDto(); target.Id = source.Id; target.OverrideAcceptable = source.OverrideAcceptable; target.OverrideOptimal = source.OverrideOptimal; target.PredefinedAtom = SettingsAtomAssembler.FromEntityToDto(source.SettingsAtom.First(a => a.Type == (int)SettingsAtomType.Predefined)); target.StatisticalAtom = SettingsAtomAssembler.FromEntityToDto(source.SettingsAtom.First(a => a.Type == (int)SettingsAtomType.Statistical)); target.AnalyticRuleSettingsId = source.AnalyticRuleSettingsEntityId; return(target); }
public static SettingsMolecule FromDtoToDomainObject(SettingsMoleculeDto source) { SettingsMolecule target = new SettingsMolecule(); target.Id = source.Id; target.OverrideAcceptable = source.OverrideAcceptable; target.OverrideOptimal = source.OverrideOptimal; target.PredefinedAtom = SettingsAtomAssembler.FromDtoToDomainObject(source.PredefinedAtom); target.StatisticalAtom = SettingsAtomAssembler.FromDtoToDomainObject(source.StatisticalAtom); target.AnalyticRuleSettingsId = source.AnalyticRuleSettingsId; return(target); }