Exemplo n.º 1
0
        public TargetingTypeModel SerializeTargetingType(Core.ManagingTargetingTypes.TargetingType targetingType)
        {
            var result = new TargetingTypeModel(
                targetingType.Id,
                targetingType.Name
                );

            return(result);
        }
Exemplo n.º 2
0
        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);
        }