ASP.NET Data Access Guidance Published
On 9/11 we published a new* set of pages on MSDN offering guidance for getting started with data access in ASP.NET. If you’re already using ASP.NET, parts of these pages will just repeat what you already know or take for granted, but a few parts contain recommendations that are new for ASP.NET 4.5. These pages clearly identify which technologies are still available and supported but are no longer part of Microsoft’s strategic direction, such that you should think twice before choosing them if you’re creating something new. One page provides help setting up SQL Server connection strings.
Here are links to the new pages, with a sampling of what you can find in them:
- ASP.NET Data Access Content Map
- Links to Internet resources for data access in ASP.NET, organized by subject.
- Choosing Data Access Options for ASP.NET Web Applications
- Choosing a DBMS (choose SQL Server).
- Choosing a SQL Server edition for development (choose LocalDB for VS 2012, SQL Server Express for VS 2010)
- Choosing an ORM (choose Entity Framework).
- Choosing an Entity Framework development workflow (Code First vs. Database First or Model First).
- LINQ vs. SQL (use LINQ wherever possible).
- Web Forms choices
- When to use ListView vs. Repeater vs. GridView controls.
- When to use DetailsView vs. FormView control.
- When to use TemplateField vs. BoundField vs. DynamicField controls.
- When to use the DynamicControl control.
- When to use data source controls vs. Web Forms model binding vs. manual data binding.
- When to use Eval and Bind vs. Item and BindItem data-binding expressions.
- Recommendation to use the new-in-4.5 data-binding expression delimiter (<%#:) for HTML encoding.
- When to use Dynamic Data project templates.
- When to use Web API vs. WCF
- SQL Server Connection Strings for ASP.NET Web Applications
- Sample connection strings for LocalDB, SQL Server Express, SQL Server, SQL Database, and SQL Server Compact.
- How to convert a connection string from LocalDB to SQL Server Express and vice versa.
- How to configure Data Source, AttachDbFileName, Initial Catalog, Integrated Security, MultipleActiveResultSets, and User Instance settings.
- Using SQL Server Compact 4.0 for ASP.NET Web Applications
- SQL Server Compact’s status compared to other SQL Server editions.
- Sections on installing, deploying, tools, and migrating to SQL Server.
- ASP.NET Data Access FAQ
- When to use Microsoft Access in a web application (don’t).
- Is SQL Server Express OK to use in production (it is).
- Can you combine the membership database with your application database (yes).
- How to round-trip web projects with databases between Visual Studio 2010 and 2012 (install SQL Server Express 2008 in Visual Studio 2012).
*Some of these ASP.NET 4.5 pages existed in ASP.NET 4 or earlier versions, but the content is all new. The others are new pages for ASP.NET 4.5.
Feedback is welcome, and this blog is the best place to post comments.
— Tom Dykstra