I an developing a page where users will be able to add and modify existing content, its not a wiki per sé but sort of, like SO's editing abilities.
I am working with EF4 and the new Code First approach in the latest CTP, so what would be the best class design for this?
my current guess is something like this:
public class VersionableText
{
public int Id { get; set; }
public DateTime Date{ get; set; }
public String Text{ get; set; }
public virtual User User{ get; set; }
}
and then use it in my other entities, in a SO context it could be something like this
public class Question
{
public int Id {get; set;}
public virtual VersionableText Title {get; set;}
public virtual VersionableText Content{get; set;}
...
}
But I'm not really convinced by it.. since I am also going to have tags, ability to delete/undelete posts, rollback, etc. Do you know how to properly design classes that help me version the content properly?