Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Eager Loading   (RSS)
Tip 37 – How to do a Conditional Include
Problem Someone asked how to do a Conditional Include a couple of days ago on StackOverflow. They wanted to query for some entity (lets say Movies) and eager load some related items (lets say Reviews) but only if the reviews match some criteria (i.e. Read More...
Tip 28 - How to implement an Eager Loading strategy
Background: Over the last 2 years lots of people have complained about the way Eager loading works in the Entity Framework, or rather the way you ask the Entity Framework to eagerly load. Here is how you do it: var results = from b in ctx.Blogs.Include(“Posts”) Read More...
Tip 22 - How to make Include really Include
This is 22nd post in my ongoing series of Entity Framework Tips . If you want to do eager loading with the Entity Framework it is generally really easy, you simply write something like this: var results = from post in ctx.Posts.Include(“Comments”) where Read More...
Tip 6 - How and when to use eager loading
When should you use eager loading? Usually in your application you know what you are going to "do" with an entity once you have retrieved it. For example if you retrieve an order so you can re-print it for a customer, you know that the re-print would Read More...
Page view tracker