Beginning ASP.NET MVC 5 with Test Driven Development

This course will give your ASP.NET MVC 5 development a solid start - in the right direction! It picks out and explains the things you need to know in order to use the framework effectively and develop testable solutions. While the course has a focus on practical skills, it also takes the time to explain important underlying concepts, including how HTTP works, the MVC design pattern, the TDD workflow and dependency inversion. 


Target audience

.NET Developers who want to learn how to develop web applications using MVC and TDD


Good knowledge of programming in C# and the .NET platform. Also requires some knowledge of HTML and CSS, and perhaps some experience with JavaScript

Day 1

Web and MVC Fundamentals

  • How the web works: HTTP, servers, clients, statelessness
  • A little history: ASP Classic, ASP.NET WebForms, other approaches
  • The MVC pattern: models, views and controllers

Hello World

  • Creating an ASP.NET MVC web application
  • Our first controller and view
  • Adding a basic model
  • Convention over configuration

Testing Fundamentals

  • What is Test Driven Development?
  • Introduction to NUnit
  • Writing our first controller test


  • The relationship between routes and controllers
  • Adding more routes
  • Routes and linking
  • Examining the request lifecycle

Better Testing with Dependency Inversion

  • What is DI, and why does it matter?
  • Refactoring towards DI
  • Testing using hand-crafted stub objects
  • Introduction to StructureMap
  • Integrating StructureMap with ASP.NET MVC

Day 2

The Razor View Engine

  • The Razor approach
  • Loops and conditionals
  • Built-in helpers
  • Creating your own helpers
  • Layouts
  • Partial views
  • What NOT to do in a view

Introducing Forms

  • Adding a form and posting to a controller
  • FormCollection - often a last resort
  • Parameter binding
  • Model binding
  • Forms and testing

Linking to a Database

  • A short introduction to Entity Framework
  • Entities as the model
  • Testable approaches to data access
  • Scaffolding


  • Client-side vs. server-side validation
  • Validation annotations
  • Custom validation
  • Validation and testing

Day 3

JavaScript and Ajax Basics

  • What is Ajax?
  • Introducing jQuery
  • The Ajax helper for partial page updates
  • Unobtrusive JavaScript


  • Introduction to JSON
  • What is a RESTful service?
  • Writing API controllers
  • Understanding HTTP verb to method conventions
  • Calling services from JavaScript
  • Testing Web APIs


  • The web is a dangerous place
  • XSS
  • Direct Object References
  • CSRF
  • Authentication
  • Authorization

Course info

Course code: T225
Duration: 3 days
Price: 25 900 SEK
Language: English

Course schedule

20 NovBook now
13 NovBook now



Contact us for details

+46 40 61 70 720

All prices excluding VAT