Personal tools
shadowfax.org.uk logo
Views

Getting started with MVC3

From Shadowfax

Jump to: navigation, search

Introduction

Microsoft's MVC Framework offers a clear, clean approach to web application development for the developer who is familiar with C# and .NET. The framework enables a consistent approach and provides scaffolding to reduce the amounts of boiler-plate code which needs to be written.

Despite the simplicity which is on offer, however, getting started can be a daunting experience, partly due to the scarcity of decent examples.

Before you begin

There are significant differences between MVC2 and MVC3. The latter has simplified template syntax and other advantages - so it is worth checking that example code is MVC3 before blindly following it.

Code First vs Database First

The majority of examples which exist show Code First development (ie where the model is written in code and the database is created from this). In many if not most real-world applications this will not be the case.

After a bit of a trawl I did find an example of the database first approach. In order for this to work it is vital that you install the latest ADO .NET Entity Framework otherwise you get the distinctly unhelpful error message Unsupported context type.



Leave your comment

Menu