The Title says it all
I'm trying to custom serialize a POCO that looks like this
public class myClass{
anotherClass entity
List<averydifferentclass> entities
String Group
String SubGroup
}
each of the above properties will need separate custom mapping/serialization
What's the best way to do this?
Thanks
Start with a BsonClassMap first. It will fit a vast majority of use cases: http://mongodb.github.io/mongo-csharp-driver/2.0/reference/bson/mapping/.
If you need more power, then implement IBsonDocumentSerializer, but that is relatively complex to get right for all the edge cases.