Building a Simple Blog Engine with ASP.NET MVC and LINQ - Part 3
page 1 of 8
Published: 03 Mar 2008
In the third part of this series, Keyvan talks about the data model in his simple blogging engine. He shows some concepts related to the LINQ side of the data model to retrieve data for the blogging engine in controllers and pass them to views with the help of screenshots and source code.
by Keyvan Nayyeri
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 52020/ 77


In the first and second parts of this article series I talked about the fundamentals of the Model View Controller (MVC) pattern and the ASP.NET MVC framework as well as the controller concept in the MVC pattern and its implementation in the ASP.NET MVC framework.

Moving on in this discussion, I want to implement KBlog with the MVC framework as a simple blog engine and show the concepts related to the ASP.NET MVC framework by using it as an example.

After getting started with controllers and learning the basics about them, we need to find a way to load data from data storage in data model and pass them to views in order to finalize the work on controllers.

For KBlog I'm using a SQL Express database with three simple tables that you'll discover in a moment. In this part of the article series I introduce you to the data model as the other main component in Model View Controller (MVC) framework and the database structure then will use LINQ to SQL to load data and pass the loaded data from LINQ to views in controllers.

Before stepping in the main body of the article let me say that this part focuses on the data side and data model concepts of the KBlog and MVC even though you'll see some final uses of our data model in the article.

View Entire Article

User Comments

Title: 2012 NFL jerseys   
Name: NIKE NFL jerseys
Date: 2012-05-20 11:28:39 PM
[/pre]Cheap NFL,NBA,MLB,NHL
[url=]Jerseys From China[/url]
[url=]2012 nike nfl Jerseys[/url]
[url=]cheap China Jerseys[/url]
[url=]Sports Jerseys China[/url]
[url=]NFL Jerseys China[/url]
[url=]NBA Jerseys China[/url]
NHL Jerseys China
[url=]MLB Jerseys China[/url]NFL jerseys For Sale online.All Our Jerseys Are Sewn On and Directly From Chinese Jerseys Factory
[pre]We Are Professional China jerseys Wholesaler
[url=]Wholesale cheap jerseys[/url]Cheap mlb jerseys
[url=]2012 mlb all atar jerseys[/url]
[url= [/url]Cheap China Wholesael[/url]
[url=]Wholesale jerseys From China[/url]
[url=]2012 nike nfl Jerseys[/url]Free Shipping,Cheap Price,7 Days Deliver
We are professional jerseys manufacturer from china,wholesal
sports [url=]Jerseys From China[/url]
[url=]NFL jerseys China[/url]
[url=]NHL Jerseys China[/url]
[url=]NBA Jerseys China[/url]
[url=]MLB Jerseys China[/url]
[url=]China Jerseys[/url],Free Shipping
We are professional jerseys manufacturer from china,wholesal
sports [url=]cheap jerseys sale online [/url]
[url=]2012 nike nfl Jerseys[/url]
[url=]cheap NFL jerseys China[/url]
[url=]NHL Jerseys C
Title: grignolino   
Date: 2010-03-09 6:03:43 AM
This blog contains really good stuff.Thanks for sharing this interesting blog.
Title: Microsoft Training Word   
Name: Tuzigoot
Date: 2010-01-29 1:26:58 AM
Looks like an Ebook that you can get something better idea.
Title: Quality SEO Services   
Name: Lurus
Date: 2010-01-29 1:25:42 AM
This article gave me better idea on how implement such things something like this.
Title: Quality SEO Services   
Name: Lurus
Date: 2010-01-29 1:25:20 AM
This article gave me better idea on how implement such things something like this.
Title: Agenzia Web Marketing   
Name: Agenzia Web Marketing
Date: 2009-12-09 5:55:22 AM
Good Post.It's really helpful and interesting
Title: Commentary   
Name: maria tere
Date: 2009-04-22 9:49:51 AM
i think the example of LINQ to SQL is very poor, because the use of that class is more extensible.
Title: Busby SEO Test   
Date: 2008-12-22 12:07:27 AM
thank you very much
Title: Question   
Name: Michael
Date: 2008-12-06 6:31:47 AM
Hi, how about if our sample url is '/2008/12/06/post-title-here' just like what Wordpress did, is it possible?
Title: Nevermind   
Name: Nick Kirkes
Date: 2008-04-26 7:07:31 PM
Just realized I am missing the DBDataContext.
Title: context.Posts?   
Name: Nick Kirkes
Date: 2008-04-26 7:06:44 PM
Thanks for the article.

I'm following your guidance, but I can't build as the "context.Posts" don't exist (same for categories). Am I missing something?
Title: anxiously awaiting...   
Name: Emiel
Date: 2008-04-24 3:06:02 AM
Here's another one waiting for part 4...
When, when, WHEN?
Title: And the part 4?   
Name: lxx
Date: 2008-04-17 11:42:43 AM
I wait for your next artical.Thanks.
Title: Reply to Mike   
Name: Keyvan Nayyeri
Date: 2008-03-28 8:53:51 AM

I'll send it to editorial team in the next three days so I expect it to be published in the next couple of weeks.
Title: Expectation?   
Name: Mike Mayers
Date: 2008-03-28 8:45:08 AM
Is there any prevision about the release of the 4th part? Can't wait to see it. Very nice.
Title: Very good!!!!!   
Name: Marcelo
Date: 2008-03-27 4:35:06 PM
Very good tutorial! Am waiting anxiously for the "View" part!!! Thank you.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-06-14 3:48:16 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search