For KBlog I want to use a LINQ to SQL mechanism to load data
to the data model and pass them to controller actions. Using LINQ to SQL is
pretty easy and should be common knowledge for a normal .NET developer, but
since it's a new technology just let me point that you can add a new LINQ to
SQL Classes item to your Models folder in ASP.NET MVC
project as shown in Figure 2.
Figure 2
After adding this item to your project you can drag and drop
database tables to the designer and don't need to do anything else because this
is all we need for this example.
Your LINQ to SQL designer should look like Figure 3 after
that.
Figure 3