Finishing the Basic Features
We have something very basic in place. We can request a URL and get some HTML displayed, but that's about it. In the following sections, I'll show you how to add some more functionality to the application such that we start to see something useful emerge.
Using the Repositories
Our first enhancement will be to starting using the repositories so that we can work with the domain model in the controller. Listing 23-9 shows the changes to the RegistrationController
class.
Listing 23-9. Using the repositories in the RegistrationController class
using System.Linq;
using System.Web.Mvc;
using EventRegistration.Models.Domain.Repository;
namespace EventRegistration.Controllers {
public class RegistrationController : ...
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.