Creating Model Classes with LINQ to SQL

Please install Silverlight or click download to watch video locally.

Learn how to create data access classes by taking advantage of Microsoft LINQ to SQL. In this video tutorial, you learn how to use a LINQ to SQL DataContext class directly within a controller. You also learn how to use the Repository Pattern to create testable and flexible database-driven applications.

Presented by Stephen Walther

Duration: 24 minutes, 15 seconds

Date: 20 August 2008

Watch    Video   |   Download    Video

Video downloads: WMV  |  Zune  |  iPod  |  PSP  |  MPEG-4  |  3GP

Audio downloads: AAC  |  WMA  |  MPEG-4  |  MPEG-3  |  MPEG-2

Comments : 19

Leave a Comment

panjkov : On August 21, 2008 8:43 PM said:

I posted sample code in C# for this video on my website

panjkov.qsh.eu/.../entry69.aspx

cv_vikram : On August 27, 2008 7:01 AM said:

Thanks....

pr0ph3t : On August 30, 2008 6:59 AM said:

nice video, i would like to see C# version of code.

Thanks

hpinsley : On November 07, 2008 10:26 PM said:

Thanks Stephen.  One question regarding the repository pattern.  If your interface returns objects that are created by the Linq to SQL designer, aren't you tying your interface -- and by extension the controller -- to a Linq to Sql class?

victortumbel : On November 11, 2008 11:00 PM said:
NikolaR : On November 15, 2008 1:49 PM said:

I hate to reiterate question hpinsley asked.

I guess that was not the point of this screen cast, but in real life scenario we would have to manually create object model and write code that populates it in repository.

adanbrown : On December 05, 2008 5:15 PM said:

The dependency Injection Pattern is very helpful, but I believe a Factory pattern provides greater flexibility in terms of code versioning and implementation of new IRepository...

Great Video...

Sojan80 : On December 11, 2008 5:07 PM said:

Is there any difference in speed or performance between Method Syntax and Query Syntax?

pkellner : On December 27, 2008 1:12 PM said:

Nice Video.  It would be nice to see how to get to another table besides a view of all.  That is, what if I want to return list 1.

It's nice to show an example of a pattern that lets me upgrade from linq to sql to linq to entities later (which is my plan)

alcsharp : On January 02, 2009 12:40 PM said:

really.. thanks for the great videos!

klawonk : On March 12, 2009 3:23 PM said:

This is one of the best videos I have seen that shows all the MVC concept and how to code all it parts. I also like how you use notepad to give a list of what we will be doing. The only thing I might have added was an NUnit test with a MOCK IRepository to really round things out. Either way, it is still a great video

Thank you.

batkhuu : On April 04, 2009 6:43 AM said:

<script>alert('ok')</script>

hs_jha : On April 09, 2009 8:32 AM said:

more...........

vinothkumarsi : On April 22, 2009 11:41 AM said:

Nice Video

www.almny.com : On May 04, 2009 11:24 AM said:

thanks man :)

very useful (F)

sparrow1 : On May 27, 2009 10:57 PM said:

great explanation. Thanks

AnarchyRising : On June 12, 2009 3:32 PM said:

Good set of vids so far .. MVC looks pretty badass

roman.spataru : On October 06, 2009 1:09 PM said:

Thanks,MVC looks simple for decompeling

donmogill : On October 15, 2009 10:41 PM said:

Here is the lambda expression in C#:

var movies = dataContext.Movies.Select((m) => m);

Leave a Comment

You must be logged in to leave a comment. Click here to log in.

Microsoft Communities