In this recipe, we are going to take the initial base application that we built in the first recipe and add a LINQ to SQL data access layer to the project. As the first project didn't require a database, we will have to also create a database to support this application.
This recipe requires that you copy the existing code base from the previous recipe. We will work from that recipe and spot weld in the new LINQ to SQL data access. You will also need to add a reference to a library called
AutoMapper. More information, as well as the DLL, can be found at http://automapper.codeplex.com/. Basically,
AutoMapper will allow us to map our domain models to the ones generated by LINQ to SQL.