这是我的sql查询;
select * from kirala inner join saatler on Kirala.Tarih = '2020-05-31' and Kirala.Onay = 'true' and Kirala.SaatID != saatler.ID
我是这样的;
var kirala2 = from t1 in _context.Kirala
join t2 in _context.Saatler on t1.SaatID equals t2.ID
where t1.Tarih == "2020-05-31" && t1.Onay == true && t1.YatID == id
select new Saatler { Saat = t2.Saat, ID = t2.ID };
但这对我没用因为 t1.SaatID equals t2.ID
我不能用不等于我还能做什么?
1条答案
按热度按时间oaxa6hgo1#
只需将连接中的所有条件移动到