Preparing the Project

We are going to build on the example project from the previous chapter, focusing on the Competition controller and its actions. So that we have a clean slate to work with, reset the contents of the CompetitionController.cs file so that they match Listing 28-1.

Listing 28-1. The contents of the CompetitionController.cs file

using System.Web.Mvc; using EventRegistration.Models.Domain; using EventRegistration.Models.Domain.Repository; namespace EventRegistration.Controllers {     public class CompetitionController : Controller {         private IRepository repository;         public CompetitionController(IRepository repo) {             repository = repo;         }         public ActionResult Index() {             return ...

Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.