0

MSDN indicates that

Entity Framework is Microsoft’s recommended data access technology for new applications

Does that mean over Linq-to-SQL, or over stored procedures as well?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mister Epic
  • 16,295
  • 13
  • 76
  • 147
  • 4
    EF allows more or less Linq-To-Anything: tables, sprocs, views ... – Alex Jul 17 '13 at 12:36
  • Yes - over everything. Linq-to-SQL was really more of a "proof-of-concept" done by the C# team - it wasn't really meant to be a enterprise-grade ORM (which Entity Framework definitely is). And EF also support stored procedures, so you can have any combination of EF-generated inline SQL and stored procedure as you see fit – marc_s Jul 17 '13 at 12:59
  • FWIW, LINQ to SQL does support stored procs as well. The broader strategy decision is to recommend EF as the ORM option. ADO.Net remains a viable tool in cases where EF is not sufficient. – Jim Wooley Jul 17 '13 at 13:27
  • The struggle I'm having is our organization is looking to adopt some db best practices, and one of the items is "Always use stored procedures for CRUD operations", which would at least double my data access development time. – Mister Epic Jul 17 '13 at 13:46
  • 1
    Chris, as long as your company pays you for your doubled time, it's not your problem. But the management must understand **that** it doubles development time and thus costs they have to invest or get from the customers. Such a best practice must be seen in context in my opinion (security requirements, are there more experienced SQL programmers than C# programmers, etc.) and the second best practice can be good enough and is a lot less expensive. – Slauma Jul 17 '13 at 17:09
  • Entity Framework 6 (still in beta as of July 2013) will support stored procedures for CRUD operations. http://entityframework.codeplex.com/wikipage?title=Roadmap. Unfortunately that doesn't get you out of writing the things ;-) – Colin Jul 18 '13 at 08:43
  • ....but this might http://stackoverflow.com/q/11673563/150342 – Colin Jul 18 '13 at 08:51

0 Answers0