Steven Giesel 4/7/2025

More LinkedIn "Tips": Dragging your whole database into memory!

Read Original

This article analyzes and debunks a common but flawed performance tip circulating on LinkedIn regarding .NET and Entity Framework. It compares two inefficient code snippets that pull an entire database table into application memory before filtering, explaining why both are problematic. The author clarifies the correct approach—applying the filter (Where clause) before calling ToList()—to ensure the query is executed efficiently on the database server. The piece serves as a technical critique and a warning to developers to critically evaluate programming advice found on social media.

More LinkedIn "Tips": Dragging your whole database into memory!

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week