public decimal ScoreData(FraudCheckData data) { decimal result = 0; List <FraudRule> storeRules = _repository.FindForStore(_context.CurrentStore.Id); if (storeRules == null) { return(result); } foreach (FraudRule rule in storeRules) { result += ScoreSingleRule(data, rule); } if (result > 10) { result = 10; } return(result); }