コード例 #1
0
ファイル: Serializer.cs プロジェクト: leewashmore/Greenfield
        public TargetingTypeGroupModel SerializeTargetingTypeGroup(TargetingTypeGroup model)
        {
            var result = new TargetingTypeGroupModel(
                model.Id,
                model.Name,
                model.BenchmarkIdOpt,
                this.SerializeTargetingTypes(model.GetTargetingTypes())
                );

            return(result);
        }
コード例 #2
0
        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);
        }