var query = from t1_row in eprg.AttestationConditions
where t1_row.Attestation.ProviderNumber == providerNumber
select t1_row.ConditionId;
1.基本查询
from 临时变量 in 集合
where 临时变量的属性==某个值.
select 临时变量.属性/ new 对象{...,...}
2. Join
var query = from a in eprg.AuthRules
join t in eprg.ProgramGroup on a.Program_Code equals t.programCode
where a.Active.Value == true && a.Svc_Type == serviceTypeCode
select new AuthRuleView
{
CPTCodes = a.CPT_Codes,
ServiceGroupId = a.Svc_Group_Id,
ProgramGroups = t.Groups,
ActionCode = a.Action_Code,
RuleMessage = a.Rule_Message
};
from 临时变量1 in 集合1
Join 临时变量2 in 集合2
on 临时变量1的属性 equals 临时变量2的属性.
3.Group By