本文介绍了如何比较下面给出的.NET描述中的2个数据表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下表是包含数据的表格
Below is the table contains Data
Name Jenkins from to code Rules taken RuleID Taken
AA BC12 UDG LAT 123456 MAD 1
BB BC13 PUN NAS 789657
下表包含我们的一些规则需要与上述数据相匹配并更新上表中的相应规则
注意规则将被修复
Below table contains some rules which we need to match with above data and update respective rule in above table
Note Rules will be fixed
No. Name Jenkins from to code Business Rules
1 AA BC12 UDG LAT 123456 MAD
2 BB !BC12 PUN NAS 789657 ABC
注意!这表示不等于
我尝试过:
尝试用linq q来解决这个问题但不起作用。
Note ! this indicate not equal to
What I have tried:
Trying to solved this with with linq q however not working.
推荐答案
.Where( x =>
(x.Jenkins != z.Jenkins && z.NotJenkins) ||
(x.Jenkins == z.Jenkins && !z.NotJenkins)
etc.
(或者有一个单独的排除列表用于查找)。
(Or have a separate "exclusion list" for lookups).
这篇关于如何比较下面给出的.NET描述中的2个数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!