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

  • Full Stack Hands-On Development with .NET

    In the fast-paced realm of modern software development, proficiency across a full stack of technologies is not just beneficial, it's essential. Microsoft has an entire stack of open source development components in its .NET platform (formerly known as .NET Core) that can be used to build an end-to-end set of applications.

  • .NET-Centric Uno Platform Debuts 'Single Project' for 9 Targets

    "We've reduced the complexity of project files and eliminated the need for explicit NuGet package references, separate project libraries, or 'shared' projects."

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • 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.

Subscribe on YouTube