I am making a Blog using MVC 3, Razor and Entity Framework. I am now working on the Comment section.
I am using the following table for comments.

Here I am using the ‘CommentParent’ column and setting it a value of an another ‘CommentID’ if a user is replying to a comment, else I have set a value of null.
Problem
I am using the following code to display comments,
@foreach (var comment in Model.Comments)
{
<div>
@comment.CommentContent
</div>
<br />
}
I am not sure how to display the “replyTo” comments as shown in the image below…

Please can anyone guide me as how this can be done…
First You will have to change your Model Class, Lets suppose your model class is :
This new property will hold the child comments of a specific comment up to N Level. Than in your View you can do it like:
You can manage the lookout of comments by using Css Class on Divs.