Archive For December 2011

Building A Razor Web Pages Site With Database First And Entity Framework

calendar_today 30 December 2011 15:25

Entity Framework ASP.NET Web Pages WebMatrix Razor

Since I published an item covering Code First development with Entity Framework and WebMatrix, I have had a few requests to provide a guide to working with the Entity Framework from a database first point of view. This post answers those requests and provides a step by step guide to getting up and running with a WebMatrix web site based on the Northwind sample database that comes with SQL Server CE 4.0.

HTML Helpers For Forms In Razor Web Pages

calendar_today 25 December 2011 11:27

HTML ASP.NET Web Pages WebMatrix Razor

A nugget that has remained partially hidden from view within the Web Pages framework is the HtmlHelper class. Parts of this class peek out in the template sites provided in WebMatrix where validation is performed and related messages displayed, but a vast range of methods designed for rendering form inputs are often overlooked in tutorials, blog articles and books (mine included). This article provides an overview of Web Pages HTML Helpers, and digs into one or two in more detail.