Your DispatchForumPostCommand class has no properties to serialize. Add a public property to serialize it. Like this:
public class DispatchForumPostCommand : ICommand {
private readonly ForumPostEntity _forumPostEntity;
public ForumPostEntity ForumPostEntity { get { return _forumPostEntity; } }
public DispatchForumPostCommand(ForumPostEntity forumPostEntity) {
_forumPostEntity = forumPostEntity;
}
public void Execute() {
_forumPostEntity.Dispatch();
}
}
I now get the following as the serialized object (I removed the inheritance of TableEntity for testing purposes):
{"ForumPostEntity":{"FromEmailAddress":null,"Message":null}}
If you want to deserialize the object as well, then you will need to add the public setter for the property, else the deserializer will not be able to set it.