# 7 - (re)Creating your DB with Linq's DataContext for testing

Date: 6/3/2008

Level: Intermediate

Author: Derik Whittaker

Tags: Linq2Sql

Views: (2837) Watched: (4393)

In this episode we will learn how to use the DataContext object that is part of Linq2Sql to build/rebuild our data base for testing.

We will walk though the creation of the database, the creation of data and learn how to wire this process up to our Tests.
Click here to Watch this Episode

Topic Resources

Images/Screen Shots:

DB Creation Logic

Test Fixture Logic

Insert Test data logic