public TargetingTypeGroupModel SerializeTargetingTypeGroup(TargetingTypeGroup model) { var result = new TargetingTypeGroupModel( model.Id, model.Name, model.BenchmarkIdOpt, this.SerializeTargetingTypes(model.GetTargetingTypes()) ); return(result); }
public TargetingTypeGroup DeserializeTargetingTypeGroup(TargetingTypeGroupModel model) { TargetingTypeGroupRepository targetingTypeGroupRepository; using (var ondemandManager = this.CreateOnDemandDataManager()) { targetingTypeGroupRepository = this.repositoryManager.ClaimTargetingTypeGroupRepository(ondemandManager); } var targetingTypeGroup = targetingTypeGroupRepository.GetTargetingTypeGroup(model.Id); return(targetingTypeGroup); }