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


6/3/2008
Level: Intermediate
Tags: Linq2Sql
Comments: (4)
Author:
Derik Whittaker


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

Download (13.28 MB) (10:58) (1440x900)
Download (9.62 MB) (10:58) (960x600)

Links/Resources:


Images/Screen Shots:


DB Creation Logic


Test Fixture Logic


Insert Test data logic


Comments: (4)

Damien Guard said....
I think he was asking how stored procedures are handled within CreateDatabase rather than how to use them from code. None of the stored procedures are re-created by CreateDatabase neither are tables not used by the datacontext and obviously not the data held within them. DeleteDatabase and CreateDatabase are limited and should be considered carefully before use. [)amien

6/6/2008 11:31:19 AM

Dairy MIlk said....

Hello,

Is it possible to have the source code of the projects demonstrated in the video tutorials.

The source code would make following the tutorials even more easy.

Also, the tutorials (all of them) are excellent

Best Regards


5/27/2009 3:02:30 AM

deutsche Casinos said....

Took me a moment to grok the outer join syntax, but you made it clear. Also, great videos--you've got a knack for this. I forwarded your site around to the other developers I work with. Keep the dimecasts coming.Its really a great idea..


2/12/2010 10:27:02 PM



Name: *
Email (not displayed): *
Url:
Comments: *



So, you Human...?