Thanks guys,
Yeah I think I'll go with Chip's idea which is the same as my number 1 option in my original post.
That way I can have "CommentView" and "ReviewView" classes with read-only properties that pass through to the data classes. E.g.
class CommentView
{
Comment _commentBody...
Hi thanks,
I think I should illustrate my data structure better. Bare in mind though that this is just an example, and I'm not particularly concerned with the database side of things, I'm interested in how to fill the data into OO objects.
OK, so I have three tables:
User (UserId, Name...
This type of situation has always bothered me a bit.
I am building a website in C# 2.0 where users can post reviews of things. Currently I have classes called User, Comment and Review. The Review class inherits from Comment because it is basically a specialized type of Comment.
Now, when I am...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.