Entity Framework Core: Data Query and Object Loading Strategies
1. LINQ Data Query
1.1 Cross Join (Cartesian Product)
Cross join, also known as the Cartesian product, combines each row from one table with every row from another table. Here are two ways to perform a cross join using LINQ, along with the resulting SQL:
var flightDetailsSet3a = (from f in ctx.FlightSet
from b in ctx.BookingSet
from p in ctx.PassengerSet
where f.FlightNo == b.FlightNo && b.PassengerID == p.PersonID && f.Departure == "Rome"
select new { flight = f, passengers = p })
.ToList();
var flightD
超级会员免费看
订阅专栏 解锁全文
6643

被折叠的 条评论
为什么被折叠?



