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

Subscribe on YouTube