public TargetingTypeModel SerializeTargetingType(Core.ManagingTargetingTypes.TargetingType targetingType) { var result = new TargetingTypeModel( targetingType.Id, targetingType.Name ); return(result); }
public TargetingType DeserializeTargetingType(TargetingTypeModel model) { TargetingTypeRepository targetingTypeRepository; using (var ondemandManager = this.CreateOnDemandDataManager()) { targetingTypeRepository = this.repositoryManager.ClaimTargetingTypeRepository(ondemandManager); } var result = targetingTypeRepository.GetTargetingType(model.Id); return(result); }