Looking at EF4 CTP5 in Parts: Part 3Easy Access to In-Memory Entities

Posted by: Julia Lerman Blog - Dont Be Iffy..., on 07 Dec 2010 | View original | Bookmarked: 0 time(s)

 Oooh laa laa, my favorite so far. One of my most oft-repeated bits of EF guidance is that “a query’s job is to execute”. If you write a query such as var myquery=context.Customers.Where(c=>Id==24); Any time you do soomthing with myquery, such as call ToList or Count or bind it to a databinding control, it will be exeucted on the database. Too many times developers will write that query and execute it and then a little later do something like: context.Customers.Count hoping...

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Regex | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 675 | Hits: 31

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD