score:1
Accepted answer
That is perfectly fine and accepted.
score:2
query.ToList();
is the correct way to force load the results. How else would you force evaluation of linq query?
Source: stackoverflow.com
Related Articles
- Disable all lazy loading or force eager loading for a LINQ context
- Why is my code doing lazy loading even after I turned it off at every possible point?
- EF4 Lazy Loading - How do I force a load?
- how to recursive load n children in comment table when lazy loading and proxies is false?
- Does lazy loading load the entire collection upon iteration?
- How to Lazy Load child object with string primary key in Entity Framework Code First?
- Is Lazy Loading really bad?
- FirstorDefault() causes lazy loading or eager loading for linq to sql
- Does LINQ with a scalar result trigger the lazy loading
- Simple Eager / Lazy loading examples in linq2sql
- Does Queryability and Lazy Loading in C# blur the lines of Data Access vs Business Logic?
- LINQ Source Code Available
- Is this a LINQ lazy loading problem?
- Lazy loading or linq query?
- How to turn this LINQ query to lazy loading
- .NET 4 Code Contracts: "requires unproven: source != null"
- Lazy Loading with DbContext
- Entity framework 6 lazy loading oddity
- EF Code first Eager loading and OrderBy problem
- How to lazy load a where condition using LINQ
- Lazy loading on IEnumerable.Take()
- Am I lazy loading these properties?
- creating Linq to sqlite dbml from DbLinq source code
- EntityFramework lazy loading not working in different context
- Loading class with lambda expressions in Compact Framework 3.5 is slow on first load
- Loading of Lazy collections in entity framework too lazy
- EF6, lazy loading not working as expected
- Understanding lazy loading optimization in C#
- How can I force a complete load along a navigation relationship in Entity Framework?
- How do I load a recursive entity without also loading the children at root level?
- Cannot compile my project with LINQ syntax
- Linq if DateTime field is older than X hours
- Refresh problems with databinding between Listview and ComboBox
- Creating a list by adding items when conditions are met
- Merging 2 C# IQueryable
- Referencing Non-Scalar Closures c#
- NHibernate LINQ projection using helper class
- A range of objects from a list
- How and where to use AddRange() method
- LINQ Case statement with COUNT and GROUP
- Xml simplification/extraction of distinct values - possible LINQ
- LINQ Use "like" instead of "(( NVL(INSTR(x, y), 0) ) = 1)"
- Using an ExpandoObject instead of the original entity in an expression
- Why the string is always empty?
- LINQ Design Curiosity: Skip/Take vs. SkipWhile/TakeWhile
- How do you make a cast in Lambda expressions?
- Entity Framework retrieve data from table with foreign key
- Create LINQ in table that has many2many relation
- vb.net/Linq: how can I use a Linq using Generic classes?
- DataTable select with LiNQ and check is there duplicate rows or not