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() }); }
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() }); }