Entity Framework Include Optimized Discover who support this features
IncludeOptimized allows you to optimize the query generated by EF by executing multiple smaller queries instead of executing only one monster SQL.
- The SQL generated by Entity Framework is too big and take several seconds or minutes to be executed.
Google Related Searches
// SELECT * FROM Order WHERE.... // SELECT * FROM OrderItem WHERE EXISTS (/* previous query */) AND ... // SELECT * FROM DeliveryItems WHERE EXISTS (/* previous query */) AND ... var orders = ctx.Orders .Where(x => x.OrderId == myOrderID) // 1 orders, 20 columns .IncludeOptimized(x => x.Items) // 20 items, 10 columns .IncludeOptimized(x => x.DeliveredItems) // 10 items, 10 columns .ToList();
|< 1 Day||Yes||Audit
Use this library at your risk!