Course Catalog
Curriculum Guides
Buy Courseware
Technical Library
About Object Innovations
Contact Us

877-558-7246 (toll free)  

4143. ASP.NET MVC 3 Using C#

Rev. 3.0


This course provides a practical hands-on introduction to developing Web applications using ASP.NET MVC 3 and C#. This new Web development framework from Microsoft emphasizes separation of concerns in the architecture and testability of applications. The course includes important new features in MVC 3 such as the Razor View Engine, MvcScaffolding, HTML 5 project templates, and more.


The course covers the fundamentals of the Model-View-Controller design pattern and its implementation in ASP.NET MVC. This technology is compared with classical ASP.NET Web Forms. The two technologies share a common ASP.NET infrastructure. Visual Studio 2010 is used as a productive platform for creating ASP.NET MVC applications. After presenting the fundamentals of the technology with several examples, the main components of Model, Controller and View are covered in detail. The discussion of the Model incorporates modern Microsoft data access technologies, including LINQ and ADO.NET Entity Framework 4.1. The routing mechanism of ASP.NET MVC is covered. The course introduces automated unit testing of Web applications, one of the chief advantages of the new technology. Security is covered, with some hands-on illustrations of attacks and defenses against them. The course includes a discussion of how ASP.NET MVC and Web Forms can be used together in the same application. The course concludes with coverage of deployment.


Numerous programming examples and exercises are provided. The student will receive a comprehensive set of notes and all the programming examples.




         Gain a thorough understanding of the philosophy and architecture of Web applications using ASP.NET MVC

         Acquire a working knowledge of Web application development using ASP.NET MVC and Visual Studio 2010

         Access databases using ADO.NET, LINQ, and Entity Framework 4.1

         Perform automated testing of Web applications created using ASP.NET MVC

         Implement security in ASP.NET MVC applications

         Combine ASP.NET MVC and Web Forms when appropriate

         Deploy ASP.NET MVC applications


Duration: 3 days


Prerequisites: The student should have a good working knowledge of C# and the .NET Framework. Basic knowledge of ASP.NET and HTML is also required.


1.      Introduction to ASP.NET MVC

Review of ASP.NET Web Forms

Advantages and Disadvantages of Web Forms

Model-View-Controller Pattern


Advantages and Disadvantages of ASP.NET MVC

Unit Testing


2.      Getting Started with ASP.NET MVC

Installing ASP.NET MVC

Using Visual Studio

Hello World for ASP.NET MVC

Rendering Views

Dynamic Output


3.      ASP.NET MVC Architecture

The Controller in ASP.NET MVC

The View in ASP.NET MVC

The Model in ASP.NET MVC

Helper Methods for HTML

Form Submission

Model Binding

Input Validation


4.      The Model

Microsoft Technologies for the Model



ADO.NET Entity Framework 4.1

NuGet Package Manager

Using MvcScaffolding

Code First Data Modeling


5.      The Controller

IController Interface

Controller Base Class


Retrieving Data from a Request

Action Results

Action Attributes


Asynchronous Controllers


6.      The View

View Responsibility

Using ViewData

Loosely-Typed Views

Strongly-Typed Views

Using Dynamic Objects

Html Helpers

Razor View Engine

Using ViewBag

Validation Attributes

HTML 5 Project Templates


7.      Routing

Routing in ASP.NET MVC

Properties of Routes

Registering Routes

Debugging Routes



8.      Unit Testing

Test-Driven Development

Test Automation



Test Cases

Test Classes

Test Runners

Testing ASP.NET MVC Applications

Dependency Injection

Mocking Frameworks

Inversion of Control Containers


9.      Security

Input Forgery

Cross-Site Scripting

Session Hijacking

Cross-site Request Forgery

SQL Injection

Using the MVC Framework Securely


10. Combining ASP.NET MVC and Web Forms

Using Web Forms in an MVC Application

Using MVC in a Web Forms Application


11. Deployment

Server Requirements

Continuous Integration

Environment Configurations


Web Deploy


Appendix A. Learning Resources


System Requirements


Required software is Visual Studio 2010 and SQL Server 2008 Express Edition (bundled with Visual Studio 2010). Service Pack 1 for Visual Studio 2010 and ASP.NET MVC 3 are also required. These are separate downloads. The operating system may be Windows XP, Windows Vista or Windows 7. Internet Information Services should be installed. See the course Setup Notes for details.


A good minimal hardware profile for this course would have a 2 GHz or better CPU, 1 GB of RAM, and at least 4 GB of free disk space for tools installation and courseware.