我们必须通过比较另一个列表对象来选择列表中的数据,但是我们能够做到这一点
我们一次发送了一个对象,该对象遍历所有导致性能问题的数据,所以任何人都可以在同一对象上帮助我们。
foreach (DataRow row in DtProc.Tables[0].Rows)
{
objClassModelProc.ACCOUNT_NUM = row["ACCOUNT_NUM"].ToString();
objClassModelProc.PX = row["CODE"].ToString();
objClassModelProc.CodeClass = row["CODE_CLASS"].ToString();
objClassModelProc.SpecialityName = row["SpecialityName"].ToString();
lstClassModelProc.Add(objClassModelProc);
var ClassModelProcList = new List<ClassModelProc>();
ClassModelProcList = lstClassModelProc;
var repositoryDenominator = new RuleRepository();
repositoryDenominator.Load(x => x.From(typeof(PreferredRuleDenominator).Assembly));
var factoryDenominator = repositoryDenominator.Compile();
var sessionDenominator = factoryDenominator.CreateSession();
sessionDenominator.Insert(objClassModelProc);
sessionDenominator.Fire();
}
PushDATAINTOMAINTABLE(DtProc.Tables[0].Rows.Count, "Final");
NRule
IEnumerable<ClassModelProc> classModelProc = null;
//ClassModelDenominator objClassModelDenominator = null;
GetMaster(DtSet, "REGetMaster");
System.Data.DataTable dt = DtSet.Tables[0];
List<string> list = dt.Rows.OfType<System.Data.DataRow>().Select(dr => (string)dr["Denominator"]).ToList();
List<string> CodeClass = new List<string> { "CPT4", "HCPC4" };
When()
.Query(() => classModelProc, x => x
.Match<ClassModelProc>(
o => list.Contains(o.PX)
, o => CodeClass.Contains(o.CodeClass)
)
.Collect());
Then()
.Do(ctx => SetCount(classModelProc, "Denominator"));