Letters from Readers

A Question About the Entity Framework

A Question About the Entity Framework
Is the Entity Framework a good replacement for Store Procedures?

Ray Akkanson
Ohio

Lennie Lobel, CTO of Sleek Technologies and a consultant at twentysix New York, is an expert on Entity Framework and Microsoft .NET Framework data-access technologies. He provided insight for the recent cover story on the Entity Framework ("Get Ready for the Entity Framework," September 2010). Here, he offers a response to Akkanson's question:

That's a loaded question, so I'll try to drive the key points. In scenarios where you "own" the back-end and have total control over its tables and permissions (which your question pre-supposes), the Entity Framework can be an excellent alternative to stored procedures, particularly for selects. The T-SQL generated dynamically at runtime is much improved from version 1, and while there's room for improvement, in most cases the Entity Framework generates perfectly adequate T-SQL. So, you can enjoy the power of the Entity Framework by using LINQ to Entities against the conceptual model and allowing the runtime to handle the exact SQL against the database. Furthermore, you can easily import specialized stored procedures into your model for cases when you need to, so it's not an all-or-nothing prospect.

Keeping It Not-Too-Simple
In his Redmond Review blog, Andrew J. Brust wrote about LightSwitch and other simple programming tools recently introduced by Microsoft ("Microsoft's New Tools: Harmony or Cacophony?" Aug. 13, 2010). He wrote that the challenge now is making these solutions work together. A reader responds:

I'm gratified to see [Brust] commenting on how many versions of SQL Server there are and how different development tools target different SQL Server versions. It's nothing new. There was ASP.NET 2.0 targeting the SQL Server Developer Edition, which had different connection strings and different project-type support. It caused me a lot of trouble with my Visual Studio 2005 Web projects when I upgraded to SQL Server 2005 Standard Edition. [Brust is] right to point it out and say they should clean that up!

L.G.
New England

Praise for C# Corner
In his August C# Corner column, "Inversion of Control Patterns for the Microsoft .NET Framework," Patrick Steele explored Inversion of Control (IOC) containers and Dependency Injection (DI). A reader responds:

As a noob programmer, this is one of the best articles about IOC and DI that I've come upon. It really helped to solidify my fragile understanding of IOC and DI. Thanks!

Al
Atlanta, Ga.

About the Author

This story was written or compiled based on feedback from the readers of Visual Studio Magazine.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube