sql:
select a.*,b.IsPayment from Appointment a left join OrderPayment b on a.yyid=b.yyid where b.IsPayment IS NULL or b.IsPayment =0
linq:(linq中无left join)
var temp = db.Appointment .Where(t => t.OrderID == orderid && t.IsDelete == 0) .Where(t => !db.OrderPayment.Any(p => p.IsPayment != PaymentTypeEnum.NoPayment && p.YYID == t.YYID)) ;
浙公网安备 33010602011771号