Example #1
0
 public RuleFunctionBase UppdateFunction(RuleFunctionId ruleFunctionId, string name, string content)
 {
     using (var scope = new TransactionScope())
     {
         RuleFunctionBase function = ruleService.UpdateRuleFunction(ruleFunctionId, name, content);
         scope.Complete();
         return(function);
     }
 }
Example #2
0
 public void DeleteFunction(PolicyId policyId, RuleFunctionId ruleFunctionId)
 {
     using (var scope = new TransactionScope())
     {
         var policy       = policyRep.GetRuleBasePolicyById(policyId);
         var ruleFunction = ruleService.GetById(ruleFunctionId);
         policy.RemoveRuleFunction(ruleFunction);
         ruleService.DeleteFunction(ruleFunctionId);
         scope.Complete();
     }
 }