コード例 #1
0
        public PolicyFunctions GetPolicyFunctionsWithPagination(long policyId)
        {
            var ruleBasePolicy = policyRep.GetRuleBasePolicyById(new PolicyId(policyId));
            var res            = ruleService.FindWithPagingBy(ruleBasePolicy.RuleFunctions.ToList());

            return(new PolicyFunctions
            {
                PolicyName = ruleBasePolicy.Name,
                PolicyId = ruleBasePolicy.Id.Id,
                Functions = res.Select(f => functionWithActionMapper.MapToModel(f)).ToList()
            });
        }
コード例 #2
0
ファイル: RuleFacadeService.cs プロジェクト: mehabadi/HPMS
        public PolicyRules GetPolicyRulesWithPagination(long policyId)
        {
            //todo:(LOW) check for correctness
            var ruleBasePolicy = policyRep.GetRuleBasePolicyById(new PolicyId(policyId));
            var res            = ruleService.FindWithPagingBy(ruleBasePolicy.Rules.ToList());

            return(new PolicyRules
            {
                PolicyName = ruleBasePolicy.Name,
                PolicyId = ruleBasePolicy.Id.Id,
                Rules = res.Select(f => ruleWithActionMapper.MapToModel(f)).ToList()
            });
        }