Hi guys,
I've some immutable types which has readonly properties
which need to be persistent with MongoDB, like:
public class Location
{
public Location(string address,
string postCode)
{
this.Address
= address;
this.PostCode
= postCode;
}
pubic string PostCode { get;
private set; }
public string Address { get; private
set; }
}
I can easily save it into mongodb, but how can I tell
the driver to create it by constructor when deserializing? Do I have to create
my own custom serializer?